Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持embeddings使用类似openai api的server #3892

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sydnash
Copy link

@sydnash sydnash commented Apr 26, 2024

目前只有embedding模型为text-embedding-ada-002的时候才会使用OpenAIEmbeddings

现在通过增加EMBEDDING_MODEL_USE_OPENAI和EMBEDDING_MODEL_OPENAI配置,可以使任意模型都可以通过OpenAIEmbeddings来调用自定义的类openai api的server来实现embedding。

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 26, 2024
@sydnash sydnash force-pushed the master branch 2 times, most recently from 6e8b750 to 4bf683a Compare April 28, 2024 03:07
@Shame-fight
Copy link

请问如何将本地embedding模型封装成openai api格式,以便其他机器上的langchain chatchat调用。老哥有没有推荐的方法或代码库

@zfishbone01
Copy link

速度真快,刚好需要用到,赞

@zfishbone01
Copy link

请问如果我用fastchat启动bge-large-zh作embedding的话,可以用这个api的访问方式吗?langchain本地启动了一个bge-large-zh用来做tokenizer会影响embedding的效果吗?我实际测试langcain的embedding跟fastchat出来的embedding数值不一样

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants