Skip to content

Commit

Permalink
refactor(runtimes/edge): make tools optional (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Jul 15, 2024
1 parent cc45566 commit efcdf48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const EdgeRuntimeRequestOptionsSchema = z
.object({
system: z.string().optional(),
messages: z.array(CoreMessageSchema).min(1),
tools: z.array(LanguageModelV1FunctionToolSchema),
tools: z.array(LanguageModelV1FunctionToolSchema).optional(),
})
.merge(LanguageModelV1CallSettingsSchema)
.merge(LanguageModelConfigSchema);
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/runtimes/edge/createEdgeRuntimeAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const createEdgeRuntimeAPI = ({
const POST = async (request: Request) => {
const {
system: clientSystem,
tools: clientTools,
tools: clientTools = [],
messages,
apiKey,
baseUrl,
Expand Down

0 comments on commit efcdf48

Please sign in to comment.