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

OpenAIEmbeddings()中该怎么设置转发的host? #290

Open
hzzgenius02 opened this issue Sep 10, 2024 · 3 comments
Open

OpenAIEmbeddings()中该怎么设置转发的host? #290

hzzgenius02 opened this issue Sep 10, 2024 · 3 comments

Comments

@hzzgenius02
Copy link

Describe the bug 描述bug
在OpenAIEmbeddings()函数中,设置host后仍然404,两个环境变量已经设置过了。

To Reproduce 复现方法
`from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma

embed_model = OpenAIEmbeddings(openai_proxy='https://api.chatanywhere.org')
vectorstore = Chroma.from_documents(documents=docs, embedding=embed_model , collection_name="openai_embed")`

Screenshots 截图
image

@ynpl
Copy link

ynpl commented Sep 10, 2024

后面加个/v1试试

@hzzgenius02
Copy link
Author

后面加个/v1试试

还是不行,附demo.py的成功运行截图
image

@ynpl
Copy link

ynpl commented Sep 10, 2024

你确定你这api是这样写的?
1openai_proxy 是设置代理的么?
还有 embed_model 是什么?
如果1确定是这样写的话 那就不知道你这啥问题了, 去langchain里面的isuess问问吧 应该怎么填写 这个就不清楚了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants