Skip to content

Commit

Permalink
Fix: tools in endpointVertex now optional (#1234)
Browse files Browse the repository at this point in the history
The googleSearchRetrieval leads to very odd behavior when chatting with Gemini, making the argument optional and removing it for certain use cases fixes the issue
  • Loading branch information
SebSchroen authored May 31, 2024
1 parent 5a1388b commit 93b39a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ MODELS=`[
// Optional
"safetyThreshold": "BLOCK_MEDIUM_AND_ABOVE",
"apiEndpoint": "", // alternative api endpoint url,
// Optional
"tools": [{
"googleSearchRetrieval": {
"disableAttribution": true
Expand Down
2 changes: 1 addition & 1 deletion src/lib/server/endpoints/google/endpointVertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const endpointVertexParametersSchema = z.object({
HarmBlockThreshold.BLOCK_ONLY_HIGH,
])
.optional(),
tools: z.array(z.any()),
tools: z.array(z.any()).optional(),
});

export function endpointVertex(input: z.input<typeof endpointVertexParametersSchema>): Endpoint {
Expand Down

0 comments on commit 93b39a0

Please sign in to comment.