xusenlinzy / api-for-open-llm

Openai style api for open large language models, using LLMs just as chatgpt! Support for LLaMA, LLaMA-2, BLOOM, Falcon, Baichuan, Qwen, Xverse, SqlCoder, CodeLLaMA, ChatGLM, ChatGLM2, ChatGLM3 etc. 开源大模型的统一后端接口
Apache License 2.0
2.33k stars 264 forks source link

用langchain调用bge时报错 #252

Closed Qoooooooooooo closed 5 months ago

Qoooooooooooo commented 6 months ago

提交前必须检查以下项目 | The following items must be checked before submission

问题类型 | Type of problem

其他问题 | Other issues

操作系统 | Operating system

Windows

详细描述问题 | Detailed description of the problem

    model = "bge-large-zh"
    # model = "text-embedding-ada-002"

    embeddings = OpenAIEmbeddings(model=model, openai_api_key=openai_api_key, openai_api_base=openai_api_base)
其中嵌入为bge-large-zh
model由bge-large-zh换成text-embedding-ada-002就没问题

Dependencies

No response

运行日志或截图 | Runtime logs or screenshots

No response

Qoooooooooooo commented 6 months ago

Warning: model not found. Using cl100k_base encoding.

darvsum commented 6 months ago

你去掉model=model试试 embeddings = OpenAIEmbeddings(openai_api_key=openai_api_key, openai_api_base=openai_api_base)