import type { TypeOf } from "io-ts"; import type { ModelApi, ModelRequestOptions } from "@typeDefs"; import { FnTemplate } from "../../utils/Template"; import type { FewShotRequestOptions } from "../shared"; interface CohereChatToolExecutionResult { call: { name: string; parameters: Record; }; outputs: Array>; } interface CohereChatHistoryMessage { role: "SYSTEM" | "CHATBOT" | "USER"; message: string; } interface CohereChatHistoryToolCall { role: "SYSTEM" | "CHATBOT" | "USER"; tool_calls: Array<{ name: string; parameters: Record; }>; message?: string; } interface CohereChatHistoryToolResults { role: "TOOL"; tool_results: Array; message?: string; } type CohereChatHistoryItem = CohereChatHistoryMessage | CohereChatHistoryToolCall | CohereChatHistoryToolResults; /** * @category Requests * @category Cohere Chat */ export interface CohereChatOptions extends ModelRequestOptions, FewShotRequestOptions { stream?: boolean; preamble?: string; chat_history?: Array; conversation_id?: string; prompt_truncation?: string; search_queries_only?: boolean; documents?: Array>; citation_quality?: string; temperature?: number; max_tokens?: number; max_input_tokens?: number; k?: number; p?: number; seed?: number; stop_sequences?: Array; frequency_penalty?: number; presence_penalty?: number; tools?: Array<{ name: string; description: string; parameter_definitions?: Record; }>; tool_results?: Array; force_single_step?: boolean; } /** * @category Templates * @category Cohere Chat */ export declare const CohereChatTemplate: FnTemplate; declare const CohereChatResponseCodec: import("io-ts").IntersectionC<[import("io-ts").TypeC<{ text: import("io-ts").StringC; generation_id: import("io-ts").StringC; finish_reason: import("io-ts").StringC; chat_history: import("io-ts").ArrayC, import("io-ts").PartialC<{ message: import("io-ts").StringC; tool_calls: import("io-ts").ArrayC; }>>; tool_results: import("io-ts").ArrayC; }>; outputs: import("io-ts").ArrayC>; }>>; }>]>>; meta: import("io-ts").IntersectionC<[import("io-ts").TypeC<{ api_version: import("io-ts").IntersectionC<[import("io-ts").TypeC<{ version: import("io-ts").StringC; }>, import("io-ts").PartialC<{ is_deprecated: import("io-ts").BooleanC; is_experimental: import("io-ts").BooleanC; }>]>; billed_units: import("io-ts").IntersectionC<[import("io-ts").TypeC<{ input_tokens: import("io-ts").NumberC; output_tokens: import("io-ts").NumberC; }>, import("io-ts").PartialC<{ search_units: import("io-ts").NumberC; classifications: import("io-ts").NumberC; }>]>; tokens: import("io-ts").IntersectionC<[import("io-ts").TypeC<{ output_tokens: import("io-ts").NumberC; }>, import("io-ts").PartialC<{ input_tokens: import("io-ts").NumberC; }>]>; }>, import("io-ts").PartialC<{ warnings: import("io-ts").ArrayC; }>]>; }>, import("io-ts").PartialC<{ tool_calls: import("io-ts").ArrayC; }>>; citations: import("io-ts").ArrayC; }>>; documents: import("io-ts").ArrayC>; is_search_required: import("io-ts").BooleanC; search_queries: import("io-ts").ArrayC>; search_results: import("io-ts").ArrayC; connector: import("io-ts").TypeC<{ id: import("io-ts").StringC; }>; document_ids: import("io-ts").ArrayC; error_message: import("io-ts").StringC; continue_on_failure: import("io-ts").BooleanC; }>>; response_id: import("io-ts").StringC; }>]>; /** * @category Responses * @category Cohere Chat */ export interface CohereChatResponse extends TypeOf { } export declare function isCohereChatResponse(response: unknown): response is CohereChatResponse; export interface CohereChatApi extends ModelApi { } /** * * ## Reference * [Cohere Chat](https://docs.cohere.com/reference/chat) * * ## Providers using this API * - {@link createCohereModelProvider | Cohere} * * @category APIs * @category Cohere Chat * @category Provider: Cohere * */ export declare const CohereChatApi: CohereChatApi; export {};