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

fix: Hide tool button on non-supported providers, Display errors for missing invocation params #5470

Merged
merged 12 commits into from
Nov 25, 2024

Conversation

cephalization
Copy link
Contributor

@cephalization cephalization commented Nov 20, 2024

  • Hide tool definition button on unsupported providers
  • Hoist invocation param definition fetching to top of each playground instance
  • Filter tool params before sending to gql if applicable
  • Warn on empty but required invocation param fields
filter-invalid-params-show-warnings.mov

Note the new warnings when params are not filled in.
Also note that I am able to submit gemini with a tool definition configured; It now gets stripped out and it was not before. This is possible because the completion submission logic is now aware of which parameters are supported by the api.

Resolves #5462
Resolves #5431

@cephalization cephalization force-pushed the cephalization/5462-disable-tools-invocation-params branch from 47b4b28 to a4ff918 Compare November 21, 2024 18:59
@cephalization cephalization changed the title fix: Hide tool button on providers that do not have tool support implemented fix: Hide tool button on non-supported providers, Display errors for missing invocation params Nov 21, 2024
@cephalization cephalization marked this pull request as ready for review November 21, 2024 20:52
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 21, 2024
@cephalization cephalization force-pushed the cephalization/5462-disable-tools-invocation-params branch from 66ac3c9 to 9ea9c1f Compare November 22, 2024 22:28
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 22, 2024
@cephalization
Copy link
Contributor Author

Need to also hide defined tools for gemini

Comment on lines 1133 to 1148
currentInvocationParametersMap.get(paramKeyName)?.[
toCamelCase(
param.invocationInputField || ""
) as keyof InvocationParameterInput
] != null ||
Copy link
Contributor

Choose a reason for hiding this comment

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

we should pull this out to make it a bit easier to read. The toCamelCase is because all params are stored like that in the map? when would these things be out of sync? one needing to be camelCased cause the other already had been

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good callout, done

@cephalization cephalization force-pushed the cephalization/5462-disable-tools-invocation-params branch from 9ea9c1f to 0c2d35d Compare November 25, 2024 19:59
@cephalization cephalization merged commit baecc54 into main Nov 25, 2024
7 checks passed
@cephalization cephalization deleted the cephalization/5462-disable-tools-invocation-params branch November 25, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
Status: Done
2 participants