mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
json_serialize returing varchar2(2096)
This commit is contained in:
parent
39e4551a45
commit
46e0992a83
1 changed files with 3 additions and 3 deletions
|
|
@ -549,7 +549,7 @@ class Oracle23aiClient(VectorDBBase):
|
||||||
|
|
||||||
cursor.execute("""
|
cursor.execute("""
|
||||||
SELECT dc.id, dc.text,
|
SELECT dc.id, dc.text,
|
||||||
JSON_SERIALIZE(dc.vmetadata) as vmetadata,
|
JSON_SERIALIZE(dc.vmetadata RETURNING VARCHAR2(4096)) as vmetadata,
|
||||||
VECTOR_DISTANCE(dc.vector, :query_vector, COSINE) as distance
|
VECTOR_DISTANCE(dc.vector, :query_vector, COSINE) as distance
|
||||||
FROM document_chunk dc
|
FROM document_chunk dc
|
||||||
WHERE dc.collection_name = :collection_name
|
WHERE dc.collection_name = :collection_name
|
||||||
|
|
@ -616,7 +616,7 @@ class Oracle23aiClient(VectorDBBase):
|
||||||
limit = limit or 100
|
limit = limit or 100
|
||||||
|
|
||||||
query = """
|
query = """
|
||||||
SELECT id, text, vmetadata
|
SELECT id, text, JSON_SERIALIZE(vmetadata RETURNING VARCHAR2(4096)) as vmetadata
|
||||||
FROM document_chunk
|
FROM document_chunk
|
||||||
WHERE collection_name = :collection_name
|
WHERE collection_name = :collection_name
|
||||||
"""
|
"""
|
||||||
|
|
@ -687,7 +687,7 @@ class Oracle23aiClient(VectorDBBase):
|
||||||
with self.get_connection() as connection:
|
with self.get_connection() as connection:
|
||||||
with connection.cursor() as cursor:
|
with connection.cursor() as cursor:
|
||||||
cursor.execute("""
|
cursor.execute("""
|
||||||
SELECT /*+ MONITOR */ id, text, vmetadata
|
SELECT /*+ MONITOR */ id, text, JSON_SERIALIZE(vmetadata RETURNING VARCHAR2(4096)) as vmetadata
|
||||||
FROM document_chunk
|
FROM document_chunk
|
||||||
WHERE collection_name = :collection_name
|
WHERE collection_name = :collection_name
|
||||||
FETCH FIRST :limit ROWS ONLY
|
FETCH FIRST :limit ROWS ONLY
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue