Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Azure OpenAI to OpenAI adapter #201

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

akihikokuroda
Copy link
Contributor

@akihikokuroda akihikokuroda commented Nov 29, 2024

Which issue(s) does this pull-request address?

Closes: #140

Description

By adding azure: true in constructor of OpenAIChatLLM input. It uses AsureOpenAI instead of OpenAI.
The environment variables necessary for AzureOpenAI are:

OPENAI_API_VERSION=
AZURE_DEPLOYMENT_NAME=
AZURE_OPENAI_API_KEY=6bY
AZURE_OPENAI_ENDPOINT=

Checklist

  • I have read the contributor guide
  • Linting passes: yarn lint or yarn lint:fix
  • Formatting is applied: yarn format or yarn format:fix
  • Unit tests pass: yarn test:unit
  • E2E tests pass: yarn test:e2e
  • Tests are included
  • Documentation is changed or added
  • Commit messages and PR title follow conventional commits

@akihikokuroda akihikokuroda requested a review from a team as a code owner November 29, 2024 16:49
@akihikokuroda
Copy link
Contributor Author

I've just used free accounts of Azure and OpenAI for development. I couldn't test with them fully.

src/adapters/openai/chat.ts Outdated Show resolved Hide resolved
src/adapters/openai/chat.ts Outdated Show resolved Hide resolved
src/adapters/openai/chat.test.ts Show resolved Hide resolved
examples/llms/providers/azureopenai.ts Outdated Show resolved Hide resolved
examples/llms/providers/azureopenai.ts Outdated Show resolved Hide resolved
tests/examples/examples.test.ts Outdated Show resolved Hide resolved
src/adapters/openai/chat.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@Tomas2D Tomas2D left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider mentioning the provider in docs (next PR).
Good job 🚀

@Tomas2D Tomas2D merged commit a6a0653 into i-am-bee:main Dec 3, 2024
2 checks passed
@akihikokuroda akihikokuroda deleted the azureopenai branch December 3, 2024 13:22
@akihikokuroda akihikokuroda mentioned this pull request Dec 5, 2024
8 tasks
matiasmolinas pushed a commit to matiasmolinas/bee-agent-framework that referenced this pull request Dec 7, 2024
Signed-off-by: Akihiko Kuroda <[email protected]>
Signed-off-by: Matias Molinas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Azure OpenAI as inference provider
2 participants