Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

chore: remove temp fix for optional params support #27

Merged
merged 4 commits into from
Mar 12, 2025

Conversation

twishabansal
Copy link
Contributor

@twishabansal twishabansal commented Mar 11, 2025

We're currently not using optional parameters in Toolbox, as they create compatibility problems with LlamaIndex agents that utilize the AgentWorkflow class.

Using AgentWorkflow with Optional Parameters support would need some workarounds which will be investigated upon the addition of the Optional Parameters functionality.

The current implementation of each tool contains tool properties with tool types being any of String or Null.

'param1': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'description': ..., 'title': ...}

The Agent Workflow needs params to have a single type like:

 'param1': {'type': 'string', 'description': ..., 'title': ...}

@twishabansal twishabansal marked this pull request as ready for review March 11, 2025 06:15
@twishabansal twishabansal requested a review from a team as a code owner March 11, 2025 06:15
Copy link
Contributor

@anubhav756 anubhav756 left a comment

Choose a reason for hiding this comment

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

To avoid redundancy, could you clarify if this change is related to googleapis/mcp-toolbox-sdk-python#68? If they are related, we may be able to eliminate additional code, as done in that PR.

@twishabansal
Copy link
Contributor Author

To avoid redundancy, could you clarify if this change is related to googleapis/genai-toolbox-langchain-python#68? If they are related, we may be able to eliminate additional code, as done in that PR.

This issue was discovered while trying to use LlamaIndex AgentWorkflow to develop a LlamaIndex Quickstart.

While the method of discovery was different, these two PRs essentially achieve the same goal functionality. Will remove some other redundant code based on googleapis/genai-toolbox-langchain-python#68. Thanks for pointing this out @anubhav756 !

@twishabansal twishabansal requested a review from anubhav756 March 12, 2025 07:15
@twishabansal twishabansal merged commit 7fc8359 into main Mar 12, 2025
9 checks passed
@twishabansal twishabansal deleted the no-optional-params branch March 12, 2025 12:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants