autogen
autogen copied to clipboard
If anyone is trying to use Azure via Github Models
This is what worked for me:
async def main() -> None:
# Define an agent
weather_agent = AssistantAgent(
name="weather_agent",
model_client=AzureOpenAIChatCompletionClient(
model="gpt-4o",
api_version="2024-02-01",
azure_endpoint="https://models.inference.ai.azure.com",
model_capabilities={
"vision":True,
"function_calling":True,
"json_output":True,
}
),
tools=[get_weather],
)