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

How to connect to Azure hosted OpenAI? #4

Open
kitzler-walli opened this issue Sep 14, 2024 · 2 comments
Open

How to connect to Azure hosted OpenAI? #4

kitzler-walli opened this issue Sep 14, 2024 · 2 comments

Comments

@kitzler-walli
Copy link

I tried to create a global openai bot with a config like this:

base_url: https://yourname.openai.azure.com/openai/deployments/gpt-4o
api_key: yourkey
text_generation:
  model_id: gpt-4o
  prompt: You are a brief, but helpful bot.
  temperature: 1.0
  max_response_tokens: 16384
  max_context_tokens: 128000

but this only returns Resource not found (code: 404)

When I copy the curl sample from Azure OpenAI Studio this looks like this:

payload="{\"messages\":[{\"role\":\"system\",\"content\":[{\"type\":\"text\",\"text\":\"You are an AI assistant that helps people find information.\"}]}],\"temperature\":0.7,\"top_p\":0.95,\"max_tokens\":800}"
   curl "https://yourname.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-02-15-preview" \
  -H "Content-Type: application/json" \
  -H "api-key: yourkey" \
  -d "$payload"

this works just fine within the container. How will I have to adapt these settings for Baibot?

@kitzler-walli
Copy link
Author

When I try to set it up as OpenAI compatible I receive this error:
Failed to get response from the OpenAI-compat chat completion API: ApiError("{\"error\":{\"code\":\"404\",\"message\":\"Resource not found\"}}")

@TheOneValen
Copy link

I have the same problem in the current version 1.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants