Skip to content

Commit

Permalink
fix: optional chaining on extraBody
Browse files Browse the repository at this point in the history
  • Loading branch information
nsarrazin committed Sep 27, 2024
1 parent a050c81 commit 9d894a9
Showing 1 changed file with 1 addition and 1 deletion.
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 @@ -65,7 +65,7 @@ export function endpointVertex(input: z.input<typeof endpointVertexParametersSch
const hasFiles = messages.some((message) => message.files && message.files.length > 0);

const generativeModel = vertex_ai.getGenerativeModel({
model: extraBody.model_version ?? model.id ?? model.name,
model: extraBody?.model_version ?? model.id ?? model.name,
safetySettings: safetyThreshold
? [
{
Expand Down

0 comments on commit 9d894a9

Please sign in to comment.