i-am-bee / bee-agent-framework

The framework for building scalable agentic applications.
https://i-am-bee.github.io/bee-agent-framework/
Apache License 2.0
1.11k stars 108 forks source link

Support Azure OpenAI as inference provider #140

Open mmurad2 opened 3 weeks ago

mmurad2 commented 3 weeks ago

Description Add Azure OpenAI as a supported inference provider

Tasks

Tomas2D commented 2 weeks ago

Tutorial on how to do so: https://i-am-bee.github.io/bee-agent-framework/#/llms?id=adding-a-new-provider-adapter

akihikokuroda commented 1 week ago

Hi! I hope I can finish #141 soon. May I try this next? Or is there something I can enjoy next?

mmurad2 commented 1 week ago

That's awesome @akihikokuroda - just assigned to you!

akihikokuroda commented 4 days ago

I was wondering what are differences between Azure OpenAI and OpenAI. Here is the statement in the Azure webpage.

Azure OpenAI Service gives customers advanced language AI with OpenAI GPT-4, GPT-3, Codex, DALL-E, Whisper, and text to speech models with the security and enterprise promise of Azure. Azure OpenAI co-develops the APIs with OpenAI, ensuring compatibility and a smooth transition from one to the other.

I'll look into the differences between them from the our adapter implementation side.

akihikokuroda commented 8 hours ago

I was thinking to use Generic to avoid code duplication between AzureOpenAI and OpenAI. I saw this note in the OpenAI node module docs. It seems that we may need separate code them.

Microsoft Azure OpenAI To use this library with Azure OpenAI, use the AzureOpenAI class instead of the OpenAI class.

[!IMPORTANT] The Azure API shape slightly differs from the core API shape which means that the static types for responses / params won't always be correct.

Is it OK to have very similar separated code for for these adapters?