Skip to content

Commit

Permalink
delete nested additionalProperties and alos handle both snake_case an…
Browse files Browse the repository at this point in the history
…d camelCase
  • Loading branch information
narengogi committed Dec 26, 2024
1 parent b0167d6 commit fc19cf7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/providers/google-vertex-ai/chatComplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ export const VertexGoogleChatCompleteConfig: ProviderConfig = {
params.tools?.forEach((tool) => {
if (tool.type === 'function') {
// these are not supported by google
delete tool.function?.parameters?.additional_properties;
delete tool.function?.parameters?.additionalProperties;
delete tool.function?.parameters?.properties?.additional_properties;
delete tool.function?.parameters?.properties?.additionalProperties;
delete tool.function?.strict;

if (tool.function.name === 'googleSearchRetrieval') {
Expand Down

0 comments on commit fc19cf7

Please sign in to comment.