【Dify】 vanna.ai 配置还原,暂时不用ollama

pull/22121/head
liuchangsheng@wisdomidata.com 11 months ago
parent 178042c1f8
commit 753d08b93f

@ -71,10 +71,14 @@ class VannaServer:
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 "bge-m3" # BAAI/bge-m3
embedding_function = CustomEmbeddingFunction({
"host": embedding_host,
"embed_model": embedding_model
})
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 = {

Loading…
Cancel
Save