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).
Add an Azure OpenAI provider preset so users can one-click-fill an Azure endpoint.
Where:
server/app/chatbot_client.py→ thePRESETSlist (copy theopenaientry as a template).Details:
https://<resource>.openai.azure.com/openai/deployments/<deployment>/chat/completions?api-version=2024-06-01.api-key: <AZURE_OPENAI_KEY>(notAuthorization).{{messages}},$.choices[0].message.content, and the$.usage.*token paths are the same.Acceptance:
azure-openaiappears inGET /api/chatbot-presetsand in the endpoint dialog dropdown.python3 server/test_chatbot_connector.pystill passes (the "all presets render valid JSON" test covers it).