// This file was auto-generated by Fern from our API Definition.

import type * as Vapi from "../index.js";

export interface CustomLlmModel {
    /** This is the starting state for the conversation. */
    messages?: Vapi.OpenAiMessage[] | undefined;
    /**
     * These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.
     *
     * Both `tools` and `toolIds` can be used together.
     */
    tools?: Vapi.CustomLlmModelToolsItem[] | undefined;
    /**
     * These are the tools that the assistant can use during the call. To use transient tools, use `tools`.
     *
     * Both `tools` and `toolIds` can be used together.
     */
    toolIds?: string[] | undefined;
    /** These are the options for the knowledge base. */
    knowledgeBase?: Vapi.CreateCustomKnowledgeBaseDto | undefined;
    /**
     * This determines whether metadata is sent in requests to the custom provider.
     *
     * - `off` will not send any metadata. payload will look like `{ messages }`
     * - `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }`
     * - `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }`
     *
     * Further, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload.
     *
     * Default is `variable`.
     */
    metadataSendMode?: Vapi.CustomLlmModelMetadataSendMode | undefined;
    /** Custom headers to send with requests. These headers can override default OpenAI headers except for Authorization (which should be specified using a custom-llm credential). */
    headers?: Record<string, string> | undefined;
    /** These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 */
    url: string;
    /**
     * This determines whether the transcriber's word level confidence is sent in requests to the custom provider. Default is false.
     * This only works for Deepgram transcribers.
     */
    wordLevelConfidenceEnabled?: boolean | undefined;
    /** This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds. */
    timeoutSeconds?: number | undefined;
    /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
    model: string;
    /** This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency. */
    temperature?: number | undefined;
    /** This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250. */
    maxTokens?: number | undefined;
    /**
     * This determines whether we detect user's emotion while they speak and send it as an additional info to model.
     *
     * Default `false` because the model is usually are good at understanding the user's emotion from text.
     *
     * @default false
     */
    emotionRecognitionEnabled?: boolean | undefined;
    /**
     * This sets how many turns at the start of the conversation to use a smaller, faster model from the same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.
     *
     * Default is 0.
     *
     * @default 0
     */
    numFastTurns?: number | undefined;
}
