Chain output returns an empty text value #7273
Replies: 1 comment
-
Hey @sosososoyoen! I'm here to help you with any bugs, questions, or contributions you might have. Let's tackle this together! I couldn't find a specific answer to why an LLMChain might return an empty text value in LangChain when using Azure OpenAI models. However, there is a similar closed issue that might be relevant. In that issue, a user was advised to set environment variables for Azure OpenAI configuration instead of directly in the code, which helped them progress further, although it led to issues with the Axios library [1]. You might want to try setting the following environment variables: export AZURE_OPENAI_API_KEY=""
export AZURE_OPENAI_API_INSTANCE_NAME=""
export AZURE_OPENAI_API_DEPLOYMENT_NAME=""
export AZURE_OPENAI_API_VERSION="2023-03-15-preview" Additionally, ensure that your |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
I am using LangChain in a Node.js 18 environment to generate AI responses through Azure OpenAI's GPT-3.5 Turbo 16k.
While the model usually provides answers appropriate to the questions, I noticed that it occasionally returns an empty text value. After upgrading the GPT model to 4o-mini, the frequency of this issue decreased, but I still don't know the exact cause of the problem.
Does anyone have insights into why this might be happening?
System Info
platform mac
langchain v0.0.122
Node v18.19.1
npm v8.13.0
Beta Was this translation helpful? Give feedback.
All reactions