Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jul 17, 2024
1 parent 91d646e commit e5ecfbb
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,12 @@ export abstract class ChatModelIntegrationTests<
const complexSchema = z.object({
decision: z.enum(["UseAPI", "UseFallback"]),
explanation: z.string(),
apiDetails: z
.object({
serviceName: z.string(),
endpointName: z.string(),
parameters: z.record(z.unknown()),
extractionPath: z.string(),
})
.optional(),
apiDetails: z.object({
serviceName: z.string(),
endpointName: z.string(),
parameters: z.record(z.unknown()),
extractionPath: z.string(),
}),
});
const toolName = "service_tool";

Expand Down Expand Up @@ -573,7 +571,7 @@ Extraction path: {extractionPath}`,
expect(result.decision).toBeDefined();
expect(result.explanation).toBeDefined();
expect(result.apiDetails).toBeDefined();
expect(result.apiDetails).toBeInstanceOf(Object);
expect(typeof result.apiDetails === "object").toBeTruthy();
}

/**
Expand Down

0 comments on commit e5ecfbb

Please sign in to comment.