Skip to content

feat: Added support for Azure OpenAI and other LLMs in Semantic Kernel #51

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

Merged
merged 4 commits into from
May 28, 2025

Conversation

oliverlabs
Copy link
Contributor

@oliverlabs oliverlabs commented May 28, 2025

Description

See google-a2a/A2A#505 for more information and background as the previous PR was closed due to the move of a2a-examples folder to a new repo.

Key changes:

  1. Enum-based Service Selection: added a ChatServices enum with AZURE_OPENAI and OPENAI options for clear service identification.

  2. Added explicity service configuration functions:

  • get_chat_completion_service(): Main function to get a service by enum value
  • _get_azure_openai_chat_completion_service(): Handles Azure OpenAI configuration
  • _get_openai_chat_completion_service(): Handles OpenAI configuration
  1. Added auto-detection with fallback using auto_detect_chat_service() function.

  2. Provided .envexample file for environment variable examples

  3. Updated the Readme file with instructions on how to define the variables for each service.

Thanks @moonbox3 for suggestions.

This change makes it possible to add other LLM chat completion services in future.

Cheers,
Oliver


Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

Fixes #45 🦕

@oliverlabs oliverlabs changed the title feat: Added support for Azure OpenAI and other LLMs in Semantic Kernel feat: Added support for Azure OpenAI in Semantic Kernel May 28, 2025
@oliverlabs oliverlabs changed the title feat: Added support for Azure OpenAI in Semantic Kernel feat: Added support for Azure OpenAI and other LLMs in Semantic Kernel May 28, 2025
@oliverlabs
Copy link
Contributor Author

@moonbox3, could you please review?

Copy link
Contributor

@jland-redhat jland-redhat left a comment

Choose a reason for hiding this comment

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

Left one small comment you can change if you want. There is no current pattern so I will let @moonbox3 comment on which way he wants to go since he ins the maintainer.

But a fan of the new code changes. I know there were a lot of changes but this looks pretty clean to me.

@oliverlabs
Copy link
Contributor Author

Left one small comment you can change if you want. There is no current pattern so I will let @moonbox3 comment on which way he wants to go since he ins the maintainer.

But a fan of the new code changes. I know there were a lot of changes but this looks pretty clean to me.

Thanks for reviewing this change, @jland-redhat. I really appreciate it. I agree about note markdown formatting. I was just following the pattern that was already set in the readme :) I fixed all instances of this now. Cheers.

@holtskinner holtskinner merged commit b4cf98d into google-a2a:main May 28, 2025
2 checks passed
@oliverlabs oliverlabs deleted the feature/sk-aoai-support branch May 28, 2025 22:05
Copy link
Contributor

@moonbox3 moonbox3 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this -- a couple of small comments.

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.

Supprting change LLM (Azure OpenAI、Deepseek) for Host Agent
4 participants