From 123f1b67ecbd92941aec0ec16437b18126bae09d Mon Sep 17 00:00:00 2001 From: shiwenshuai Date: Mon, 23 Jun 2025 10:19:27 +0800 Subject: [PATCH] =?UTF-8?q?vanna=E5=90=91=E9=87=8F=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=94=B9=E4=B8=BAollama?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/extensions/utils/vanna_text2sql.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/api/extensions/utils/vanna_text2sql.py b/api/extensions/utils/vanna_text2sql.py index dbca9cee0b..311759c087 100644 --- a/api/extensions/utils/vanna_text2sql.py +++ b/api/extensions/utils/vanna_text2sql.py @@ -70,15 +70,15 @@ class VannaServer: milvus_client = MilvusClient(uri=milvus_uri,db_name=milvus_database) embedding_host = config["embedding_host"] if "embedding_host" in config else 'http://wsd.wisdomidata.com:19042' - embedding_model = config["embedding_model"] if "embedding_model" in config else "BAAI/bge-m3" # BAAI/bge-m3 - embedding_function = model.dense.SentenceTransformerEmbeddingFunction( - model_name=embedding_model, - device='cpu' # 'cpu' or 'cuda:0' - ) - # embedding_function = CustomEmbeddingFunction({ - # "host": embedding_host, - # "embed_model": embedding_model - # }) + embedding_model = config["embedding_model"] if "embedding_model" in config else "bge-m3" # BAAI/bge-m3 + # embedding_function = model.dense.SentenceTransformerEmbeddingFunction( + # model_name=embedding_model, + # device='cpu' # 'cpu' or 'cuda:0' + # ) + embedding_function = CustomEmbeddingFunction({ + "host": embedding_host, + "embed_model": embedding_model + }) chat_llm = Ollama if llm_type == "ollama": config = {