-
Notifications
You must be signed in to change notification settings - Fork 37
fixes issue 39 #40
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
fixes issue 39 #40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this look good many thanks for the PR!
What I would just add is a couple of tests for both features it brings:
- one most simple test that would have failed under previous code for literal and enum
- one most simple test that would have failed under previous code with nested $refs
Hey @grll — thanks for reviewing the PR! I've implemented the changes you suggested. Specifically: 1. Added
|
There was a problem hiding this 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 can just remove the .DS_Store from git as well then we can merge. Many thanks!
.DS_Store
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the file is still there you need to remove it as well from the git history:
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
and then commit / push again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍🏻
also if you can quickly run the linter: |
Many thanks @valerio-valente-ist and team helping on this fix! |
I will release a new patch version later today |
Fixes
1. updated the
create_model_from_json_schema
function inmcpadapt/src/mcpadapt/utils/modeling.py
to ensure types likeLiteral
andEnum
are correctly preserved in the generated input schema used by the CrewAI adapter. Thusitems
andanyOf
are added toField
object inprocess_schema
function.2. created
resolve_refs_and_remove_defs
function inmcpadapt/src/mcpadapt/utils/modeling.py
to remove code-breaking$defs
and$refs
that are introduced when a custom class is used as one of the args type-hints. The function is called withinmcpadapt/src/mcpadapt/crewai_adapter.py
.Contributors