Skip to content

Add an Azure OpenAI provider preset #1

@prat3ik

Description

@prat3ik

Add an Azure OpenAI provider preset so users can one-click-fill an Azure endpoint.

Where: server/app/chatbot_client.py → the PRESETS list (copy the openai entry as a template).

Details:

  • Azure uses a deployment URL like https://<resource>.openai.azure.com/openai/deployments/<deployment>/chat/completions?api-version=2024-06-01.
  • Auth header is api-key: <AZURE_OPENAI_KEY> (not Authorization).
  • Request/response shape matches OpenAI, so {{messages}}, $.choices[0].message.content, and the $.usage.* token paths are the same.

Acceptance:

  • New preset with id azure-openai appears in GET /api/chatbot-presets and in the endpoint dialog dropdown.
  • python3 server/test_chatbot_connector.py still passes (the "all presets render valid JSON" test covers it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions