Wrapper around Baidu ERNIE large language models that use the Chat endpoint.

To use you should have the QIANFAN_AK and QIANFAN_SK environment variable set.

Hierarchy (view full)

Implements

  • BaiduWenxinChatInput

Constructors

Properties

apiUrl: string
model: string = "ERNIE-Bot-turbo"
modelName: string = "ERNIE-Bot-turbo"
streaming: boolean = false
apiKey?: string
baiduApiKey?: string
baiduSecretKey?: string
client?: any
penaltyScore?: number
prefixMessages?: WenxinMessage[]
qianfanAK?: string
qianfanAccessKey?: string
qianfanSK?: string
qianfanSecretKey?: string
temperature?: number
topP?: number
userId?: string

Accessors

Methods

  • Get the identifying parameters for the model

    Returns {
        model_name: string;
        penalty_score?: number;
        stream?: boolean;
        system?: string;
        temperature?: number;
        top_p?: number;
        user_id?: string;
    }

    • model_name: string
    • Optional penalty_score?: number
    • Optional stream?: boolean
    • Optional system?: string
    • Optional temperature?: number
    • Optional top_p?: number
    • Optional user_id?: string

Generated using TypeDoc