ai-utils.js
Version:
Build AI applications, chatbots, and agents with JavaScript and TypeScript.
10 lines (9 loc) • 528 B
TypeScript
import { ModelCallFinishedEvent, ModelCallStartedEvent } from "./ModelCallEvent.js";
import { ModelInformation } from "./ModelInformation.js";
export type SuccessfulModelCall = {
type: "image-generation" | "json-generation" | "text-embedding" | "text-generation" | "text-streaming" | "transcription";
model: ModelInformation;
settings: unknown;
response: unknown;
};
export declare function extractSuccessfulModelCalls(modelCallEvents: (ModelCallFinishedEvent | ModelCallStartedEvent)[]): SuccessfulModelCall[];