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

当升级langchain==0.0.292时,会报错openai.error.InvalidRequestError: Resource not found #30

Open
SawanoHao opened this issue Sep 17, 2023 · 1 comment

Comments

@SawanoHao
Copy link

报错位置chatbot的get answer函数:
result = self.chatchain({
"question": query,
"chat_history": chat_history_for_chain
},
return_only_outputs=True)

@SawanoHao
Copy link
Author

已解决,升级langchain后需要声明Embedding里关于azure的资源,否则,找的是openai的Embedding,会报错

    self.embeddings = OpenAIEmbeddings(
        deployment="text-en-ada-002",
        model="text-embedding-ada-002",
        openai_api_base="https://xxx.openai.azure.com/",
        openai_api_type="azure",
        chunk_size=1
    )

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

1 participant