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

[BUG] Connection for Azure OpenAI not working when following README procedure #3321

Closed
tvriesde opened this issue May 21, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@tvriesde
Copy link

tvriesde commented May 21, 2024

Describe the bug
After creation of connection using the README instructions for Azure OpenAI I get error:

pf.flow.test failed with UserErrorException: Exception: OpenAI API hits NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}} [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]

How To Reproduce the bug
Steps to reproduce the behavior, how frequent can you experience the bug:

  1. Create Codespace
  2. Create OpenAI in Azure and deploy a model
  3. Create connection using: pf connection create --file ./my_chatbot/azure_openai.yaml --set api_key=<your_api_key> api_base=<your_api_base> --name open_ai_connection
  4. pf flow test --flow ./my_chatbot --interactive

as API_BASE i've used: Azure OpenAI Endpoint -> "https://something.openai.azure.com/"
as API_KEY i've used: Azure OpenAI Key1

Error message:
OpenAI API hits NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}} [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]
pf.flow.test failed with UserErrorException: Exception: OpenAI API hits NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}} [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]

azure_openai.yaml content:
$schema: https://azuremlschemas.azureedge.net/promptflow/latest/AzureOpenAIConnection.schema.json
name: open_ai_connection
type: azure_open_ai
api_key: ""
api_base: ""
api_type: "azure"

I would expect that I also have to supply the deployment name but don't find the option.

@tvriesde tvriesde added the bug Something isn't working label May 21, 2024
@tvriesde tvriesde changed the title [BUG] Created connection not working [BUG] Connection for Azure OpenAI not working when following README procedure May 21, 2024
@brynn-code brynn-code self-assigned this May 22, 2024
@brynn-code
Copy link
Contributor

brynn-code commented May 22, 2024

Hi @tvriesde , thanks for reaching us. The 'deployment name' is not part of connection, it was on the flow node in flow.dag.yaml if you are using the llm node to make the openai call. For example:
image

@tvriesde
Copy link
Author

Hi @tvriesde , thanks for reaching us. The 'deployment name' is not part of connection, it was on the flow node in flow.dag.yaml if you are using the llm node to make the openai call. For example: image

Thanks @brynn-code. Works like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants