Open SawanoHao opened 1 year ago
已解决,升级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
)
报错位置chatbot的get answer函数: result = self.chatchain({ "question": query, "chat_history": chat_history_for_chain }, return_only_outputs=True)