CohereInput: {
    apiKey: undefined | string;
    cache?: undefined | boolean | BaseCache<Generation[]>;
    callbackManager?: undefined | CallbackManager;
    callbacks?: undefined | Callbacks;
    client: undefined | CustomClient;
    concurrency?: undefined | number;
    maxConcurrency?: undefined | number;
    maxRetries?: undefined | number;
    maxTokens?: undefined | number;
    metadata?: undefined | Record<string, unknown>;
    model?: undefined | string;
    onFailedAttempt?: undefined | FailedAttemptHandler;
    tags?: undefined | string[];
    temperature?: undefined | number;
    verbose?: undefined | boolean;
}

Type declaration

  • apiKey: undefined | string
  • Optionalcache?: undefined | boolean | BaseCache<Generation[]>
  • OptionalcallbackManager?: undefined | CallbackManager

    Use callbacks instead

  • Optionalcallbacks?: undefined | Callbacks
  • client: undefined | CustomClient
  • Optionalconcurrency?: undefined | number

    Use maxConcurrency instead

  • OptionalmaxConcurrency?: undefined | number

    The maximum number of concurrent calls that can be made. Defaults to Infinity, which means no limit.

  • OptionalmaxRetries?: undefined | number

    The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6.

  • OptionalmaxTokens?: undefined | number

    Maximum number of tokens to generate in the completion.

  • Optionalmetadata?: undefined | Record<string, unknown>
  • Optionalmodel?: undefined | string

    Model to use

  • OptionalonFailedAttempt?: undefined | FailedAttemptHandler

    Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable.

  • Optionaltags?: undefined | string[]
  • Optionaltemperature?: undefined | number

    Sampling temperature to use

  • Optionalverbose?: undefined | boolean