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

Azure GPT models not working #590

Closed
venkatesh3893 opened this issue Jul 1, 2024 · 4 comments
Closed

Azure GPT models not working #590

venkatesh3893 opened this issue Jul 1, 2024 · 4 comments
Labels
status: waiting confirmation Issue is waiting confirmation whether the proposed solution/workaround works.

Comments

@venkatesh3893
Copy link

I am trying to establish guardrails setup for Azure OpenAI models. I have used the below configuration in config.yaml.

models:
-type: main
engine: azure
model: gpt-4
parameters:
azure_endpoint: ""
api_version: "2023-07-01-preview"
openai_api_version: "2023-07-01-preview"
deployment_name: gpt-4
api_key:""

I have tried multiple combinations and it just didnt work and no error was thrown.

@PeerBoerner1
Copy link

PeerBoerner1 commented Jul 4, 2024

This is working for me right now on Azure. I think you must ensure the model name you're using matches what's in your deployment details. I'm using a different model below but the techniques should be the same. I hope this helps.

models:
  - type: main
    engine: azure
    model: gpt-4o
    parameters:
      azure_endpoint: https://yourendpoint.openai.azure.com/
      api_version: 2023-03-15-preview
      deployment_name: GPT-4o
      api_key: averylongsetofcharacters

Important: if the api_version can be interpreted as a date, be sure you put it in double quotes. It’s not required here because the version has the -preview suffix. But, if the version is just a date (like many open ai models”, you must put it in quotes. I left them off when using a non preview api version and got errors.

@drazvan
Copy link
Collaborator

drazvan commented Jul 4, 2024

Thanks @PeerBoerner1!

@Pouyanpi
Copy link
Collaborator

Hi @venkatesh3893, could you follow @PeerBoerner1's solution?

@Pouyanpi Pouyanpi added the status: waiting confirmation Issue is waiting confirmation whether the proposed solution/workaround works. label Aug 16, 2024
@Pouyanpi
Copy link
Collaborator

@venkatesh3893 , since you've reacted with a thumbs up, I assume the issue has been resolved, and I proceed to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting confirmation Issue is waiting confirmation whether the proposed solution/workaround works.
Projects
None yet
Development

No branches or pull requests

4 participants