You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use from langchain.llms import AzureOpenAI with the following configuration:
os.environ["OPENAI_API_KEY"] = api_key_35
os.environ["OPENAI_API_VERSION"] = "2023-03-15-preview"
Where api_key_35 is the key for AzureOpenAI.
The code is:
llm = AzureOpenAI(
max_tokens=1024
,deployment_name = "gpt-35-turbo"
,openai_api_type = "azure"
,model_name="gpt-35-turbo"
)
The returned result is:
openai.error.AuthenticationError: Incorrect API key provided: ********************. You can find your API key at https://platform.openai.com/account/api-keys.
I changed the configuration to:
os.environ["OPENAI_API_KEY"] = api_key_35
os.environ["OPENAI_API_BASE"] = api_base_35
os.environ["OPENAI_API_VERSION"] = "2023-03-15-preview"
Where api_key_35 is the key for AzureOpenAI.
The code is:
llm = AzureOpenAI(
max_tokens=1024
,deployment_name = "gpt-35-turbo"
,openai_api_type = "azure"
,model_name="gpt-35-turbo"
)
The returned result is:
openai.error.InvalidRequestError: Resource not found
If I use the key for OpenAI instead of AzureOpenAI, it runs successfully. Why is there an error?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to use from langchain.llms import AzureOpenAI with the following configuration:
os.environ["OPENAI_API_KEY"] = api_key_35
os.environ["OPENAI_API_VERSION"] = "2023-03-15-preview"
Where api_key_35 is the key for AzureOpenAI.
The code is:
llm = AzureOpenAI(
max_tokens=1024
,deployment_name = "gpt-35-turbo"
,openai_api_type = "azure"
,model_name="gpt-35-turbo"
)
The returned result is:
openai.error.AuthenticationError: Incorrect API key provided: ********************. You can find your API key at https://platform.openai.com/account/api-keys.
I changed the configuration to:
os.environ["OPENAI_API_KEY"] = api_key_35
os.environ["OPENAI_API_BASE"] = api_base_35
os.environ["OPENAI_API_VERSION"] = "2023-03-15-preview"
Where api_key_35 is the key for AzureOpenAI.
The code is:
llm = AzureOpenAI(
max_tokens=1024
,deployment_name = "gpt-35-turbo"
,openai_api_type = "azure"
,model_name="gpt-35-turbo"
)
The returned result is:
openai.error.InvalidRequestError: Resource not found
If I use the key for OpenAI instead of AzureOpenAI, it runs successfully. Why is there an error?
Beta Was this translation helpful? Give feedback.
All reactions