UNPKG

jest-ai

Version:

Custom jest matchers for testing AI applications

5 lines (4 loc) 542 B
import type { RequiredActionFunctionToolCall } from "openai/src/resources/beta/threads/runs"; import type { ChatCompletionMessageToolCall } from "openai/src/resources/chat/completions"; export declare function cosineSimilarity(vecA: number[], vecB: number[]): number; export declare function matchToolCallsToExpectedTools(toolCalls: ChatCompletionMessageToolCall[] | RequiredActionFunctionToolCall[], expectedTools: string[] | RequiredActionFunctionToolCall.Function[] | ChatCompletionMessageToolCall.Function[], allCheck: boolean): boolean;