om-ai-lab / OmAgent

A multimodal agent framework for solving complex tasks
Apache License 2.0
439 stars 27 forks source link

Azure OpenAI API key support #1

Closed Zeng555 closed 2 months ago

Zeng555 commented 2 months ago

How to use Azure OpenAI keys in this repo?

panregedit commented 2 months ago

One approach involves directing the Azure API via the One API project (https://github.com/songquanpeng/one-api), enabling access to an API endpoint compatible with OpenAI integration. Alternatively, some adjustments within the code are necessary at the points where OpenAI is invoked. The OpenAI package encompasses an AzureOpenAI class designed for interfacing with Azure services.

XeonHis commented 2 months ago

Also, you can use the config template as follows with our implemented AzureGPTLLM

{
    "name": "AzureGPTLLM",
    "model_id": "your deployment model id in azure dashboard",
    "api_key": "your azure openai api key",
    "endpoint": "your custom azure openai endpoint",
    "api_version": "2024-02-15-preview", # same to api_version in azure dashboard is better, default is 2024-02-15-preview
    "temperature": 0,
    "vision": true,
    "response_format": "json_object or text"
  }
Zeng555 commented 2 months ago

Collaborator

Understood, Much appreciate!