Heroku LangChain - v0.2.1
    Preparing search index...

    Interface HerokuMiaFields

    Interface for the fields to instantiate HerokuMia. Extends BaseChatModelParams and includes Heroku-specific parameters.

    interface HerokuMiaFields {
        model?: string;
        temperature?: number;
        maxTokens?: number;
        stop?: string[];
        stream?: boolean;
        topP?: number;
        apiKey?: string;
        apiUrl?: string;
        maxRetries?: number;
        timeout?: number;
        streaming?: boolean;
        additionalKwargs?: Record<string, any>;
    }

    Hierarchy

    • BaseChatModelParams
      • HerokuMiaFields
    Index

    Properties

    model?: string

    The model ID to use for completion (e.g., "claude-3-7-sonnet"). As specified in Heroku API documentation. If not provided, defaults to process.env.INFERENCE_MODEL_ID.

    temperature?: number

    Controls randomness. Lower values make responses more focused. Parameter from Heroku API.

    1.0
    
    maxTokens?: number

    Maximum tokens the model may generate. Maps to max_tokens in Heroku API.

    stop?: string[]

    List of strings that stop generation. Parameter from Heroku API.

    null
    
    stream?: boolean

    Whether to stream responses. If true, invoke will still return a complete response. Used by stream(). Heroku API parameter.

    false
    
    topP?: number

    Proportion of tokens to consider (cumulative probability). Maps to top_p in Heroku API.

    0.999
    
    apiKey?: string

    Heroku Inference API Key (INFERENCE_KEY). If not provided, the library will check the environment variable INFERENCE_KEY. Used for authentication.

    apiUrl?: string

    Heroku Inference API Base URL (INFERENCE_URL). If not provided, checks env var INFERENCE_URL or uses a sensible Heroku default. The endpoint path is /v1/chat/completions.

    maxRetries?: number

    Maximum number of retries for failed requests. Standard LangChain parameter for resilience.

    2
    
    timeout?: number

    Timeout for API requests in milliseconds. Standard LangChain parameter for request duration control.

    streaming?: boolean

    Alias for stream for consistency. Sets default for internal _generate method's streaming behavior.

    false
    
    additionalKwargs?: Record<string, any>

    Allows passing other Heroku-specific parameters not explicitly defined (e.g., extended_thinking). Provides flexibility for future Heroku API additions or less common parameters.

    {}