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

Semantic kernel model adapter #4851

Merged

Conversation

lspinheiro
Copy link
Collaborator

Why are these changes needed?

Related issue number

Checks

@ekzhu
Copy link
Collaborator

ekzhu commented Dec 31, 2024

I can see it is going to be useful for integrating with non-openai APIs such as Gemini and Mistral, using SK's large ecosystem of connectors. Could you show a few examples of such in the API documentation? This way users can take away a clear picture of why this model adapter is useful.

@lspinheiro lspinheiro force-pushed the lpinheiro/feat/add-sk-model-adapter branch from f77cd39 to 3fe641e Compare January 3, 2025 22:39
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 81.44330% with 36 lines in your changes missing coverage. Please review.

Project coverage is 70.15%. Comparing base (9b1260d) to head (0402136).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...els/semantic_kernel/_sk_chat_completion_adapter.py 81.59% 30 Missing ⚠️
...ools/semantic_kernel/_kernel_function_from_tool.py 77.77% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4851      +/-   ##
==========================================
+ Coverage   69.95%   70.15%   +0.20%     
==========================================
  Files         168      172       +4     
  Lines       10716    10910     +194     
==========================================
+ Hits         7496     7654     +158     
- Misses       3220     3256      +36     
Flag Coverage Δ
unittests 70.15% <81.44%> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lspinheiro lspinheiro marked this pull request as ready for review January 13, 2025 06:11
@lspinheiro lspinheiro changed the title [DRAFT] semantic kernel model adapter Semantic kernel model adapter Jan 13, 2025
@ekzhu ekzhu added this to the 0.4.2 milestone Jan 13, 2025
Copy link
Member

@jackgerrits jackgerrits left a comment

Choose a reason for hiding this comment

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

Looks good! If you have a chance could you just add the relevant tool and model pages here so that the API reference docs show up https://github.com/microsoft/autogen/tree/main/python/packages/autogen-core/docs/src/reference/python

We can always do it post merge if you'd rather just get this in to avoid conficts

Copy link
Collaborator

@ekzhu ekzhu left a comment

Choose a reason for hiding this comment

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

Doc headings underlines need to be the same length as the title 😁

@lspinheiro
Copy link
Collaborator Author

@jackgerrits @ekzhu , I added autodoc_pydantic_model_show_json_error_strategy = "coerce" to conf.py. I had some issues with non-serializable pydantic attributes coming from SK which generated issues in the json schema generation of the docs. Updating to coerce seemed reasonable: https://autodoc-pydantic.readthedocs.io/en/stable/users/configuration.html

Let me know if you see any issues and I can revert it later.

@lspinheiro lspinheiro merged commit 918292f into microsoft:main Jan 18, 2025
64 of 65 checks passed
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.

4 participants