mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 23:29:21 +00:00
community: Problem with embeddings in new versions of clickhouse. (#26041)
Starting with Clickhouse version 24.8, a different type of configuration has been introduced in the vectorized data ingestion, and if this configuration occurs, an error occurs when generating the table. As can be seen below:  --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
parent
2a1029c53c
commit
5647276998
@ -309,6 +309,14 @@ class Clickhouse(VectorStore):
|
||||
**kwargs,
|
||||
)
|
||||
# Enable JSON type
|
||||
try:
|
||||
self.client.command("SET allow_experimental_json_type=1")
|
||||
except Exception as _:
|
||||
logger.debug(
|
||||
f"Clickhouse version={self.client.server_version} - "
|
||||
"There is no allow_experimental_json_type parameter."
|
||||
)
|
||||
|
||||
self.client.command("SET allow_experimental_object_type=1")
|
||||
if self.config.index_type:
|
||||
# Enable index
|
||||
|
@ -193,6 +193,13 @@ class MyScale(VectorStore):
|
||||
password=self.config.password,
|
||||
**kwargs,
|
||||
)
|
||||
try:
|
||||
self.client.command("SET allow_experimental_json_type=1")
|
||||
except Exception as _:
|
||||
logger.debug(
|
||||
f"Clickhouse version={self.client.server_version} - "
|
||||
"There is no allow_experimental_json_type parameter."
|
||||
)
|
||||
self.client.command("SET allow_experimental_object_type=1")
|
||||
self.client.command(schema_)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user