kobai-sdk 0.2.8rc14__tar.gz → 0.2.8rc15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kobai-sdk might be problematic. Click here for more details.
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/PKG-INFO +1 -1
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai/ai_rag.py +9 -1
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai_sdk.egg-info/PKG-INFO +1 -1
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/pyproject.toml +1 -1
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/LICENSE +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/MANIFEST.in +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/README.md +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai/__init__.py +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai/ai_query.py +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai/databricks_client.py +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai/demo_tenant_client.py +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai/spark_client.py +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai/tenant_api.py +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai/tenant_client.py +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai_sdk.egg-info/SOURCES.txt +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai_sdk.egg-info/dependency_links.txt +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai_sdk.egg-info/requires.txt +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/kobai_sdk.egg-info/top_level.txt +0 -0
- {kobai_sdk-0.2.8rc14 → kobai_sdk-0.2.8rc15}/setup.cfg +0 -0
|
@@ -69,6 +69,7 @@ def generate_sentences(tc: AIContext, replica_schema=None, concept_white_list=No
|
|
|
69
69
|
|
|
70
70
|
print("Dropping and Recreating the RAG Table")
|
|
71
71
|
ss.sql(__create_rag_table_sql(tc.schema, tc.model_id))
|
|
72
|
+
ss.sql(__clear_rag_table_sql(tc.schema, tc.model_id))
|
|
72
73
|
|
|
73
74
|
print("Generating Extraction SQL")
|
|
74
75
|
sql_statements = []
|
|
@@ -89,6 +90,7 @@ def generate_sentences(tc: AIContext, replica_schema=None, concept_white_list=No
|
|
|
89
90
|
if replica_schema is not None:
|
|
90
91
|
print("Replicating Schema")
|
|
91
92
|
ss.sql(__create_rag_table_sql(replica_schema, tc.model_id))
|
|
93
|
+
ss.sql(__clear_rag_table_sql(tc.schema, tc.model_id))
|
|
92
94
|
ss.sql(__replicate_to_catalog_sql(
|
|
93
95
|
tc.schema, replica_schema, tc.model_id))
|
|
94
96
|
|
|
@@ -274,8 +276,14 @@ def rag_delta(tc: AIContext, emb_model: Union[SentenceTransformer, Embeddings],
|
|
|
274
276
|
return response
|
|
275
277
|
|
|
276
278
|
|
|
279
|
+
#def __create_rag_table_sql(schema, model_id):
|
|
280
|
+
# return f"CREATE OR REPLACE TABLE {schema}.rag_{model_id} (id BIGINT GENERATED BY DEFAULT AS IDENTITY, content STRING, type string, concept_id string, vector ARRAY<FLOAT>) TBLPROPERTIES (delta.enableChangeDataFeed = true)"
|
|
281
|
+
|
|
277
282
|
def __create_rag_table_sql(schema, model_id):
|
|
278
|
-
return f"CREATE
|
|
283
|
+
return f"CREATE TABLE IF NOT EXISTS {schema}.rag_{model_id} (id BIGINT GENERATED BY DEFAULT AS IDENTITY, content STRING, type string, concept_id string, vector ARRAY<FLOAT>) TBLPROPERTIES (delta.enableChangeDataFeed = true)"
|
|
284
|
+
|
|
285
|
+
def __clear_rag_table_sql(schema, model_id):
|
|
286
|
+
return f"DELETE FROM {schema}.rag_{model_id}"
|
|
279
287
|
|
|
280
288
|
|
|
281
289
|
def __replicate_to_catalog_sql(base_schema, target_schema, model_id):
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "kobai-sdk"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.8rc15"
|
|
8
8
|
description = "A package that enables interaction with a Kobai tenant."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Ryan Oattes", email = "ryan@kobai.io" }]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|