generative-ts

Interface CohereChatOptions

interface CohereChatOptions {
    $prompt: string;
    chat_history?: CohereChatHistoryItem[];
    citation_quality?: string;
    conversation_id?: string;
    documents?: Record<string, string>[];
    examplePairs?: {
        assistant: string;
        user: string;
    }[];
    force_single_step?: boolean;
    frequency_penalty?: number;
    k?: number;
    max_input_tokens?: number;
    max_tokens?: number;
    modelId: string;
    p?: number;
    preamble?: string;
    presence_penalty?: number;
    prompt_truncation?: string;
    search_queries_only?: boolean;
    seed?: number;
    stop_sequences?: string[];
    stream?: boolean;
    system?: string;
    temperature?: number;
    tool_results?: CohereChatToolExecutionResult[];
    tools?: {
        description: string;
        name: string;
        parameter_definitions?: Record<string, {
            description?: string;
            required?: boolean;
            type: string;
        }>;
    }[];
}

Hierarchy

  • ModelRequestOptions
  • FewShotRequestOptions
    • CohereChatOptions

Properties

$prompt: string
chat_history?: CohereChatHistoryItem[]
citation_quality?: string
conversation_id?: string
documents?: Record<string, string>[]
examplePairs?: {
    assistant: string;
    user: string;
}[]

Type declaration

  • assistant: string
  • user: string
force_single_step?: boolean
frequency_penalty?: number
k?: number
max_input_tokens?: number
max_tokens?: number
modelId: string
p?: number
preamble?: string
presence_penalty?: number
prompt_truncation?: string
search_queries_only?: boolean
seed?: number
stop_sequences?: string[]
stream?: boolean
system?: string
temperature?: number
tool_results?: CohereChatToolExecutionResult[]
tools?: {
    description: string;
    name: string;
    parameter_definitions?: Record<string, {
        description?: string;
        required?: boolean;
        type: string;
    }>;
}[]

Type declaration

  • description: string
  • name: string
  • Optional parameter_definitions?: Record<string, {
        description?: string;
        required?: boolean;
        type: string;
    }>