langchain.js
    Preparing search index...
    const model = new ChatIflytekXinghuo();
    const response = await model.invoke([new HumanMessage("Nice to meet you!")]);
    console.log(response);

    Hierarchy

    • BaseChatIflytekXinghuo
      • ChatIflytekXinghuo
    Index

    Constructors

    • Parameters

      • Optionalfields: any

      Returns ChatIflytekXinghuo

    Properties

    apiUrl: string
    domain: string
    iflytekApiKey: string

    API key to use when making requests. Defaults to the value of IFLYTEK_API_KEY environment variable.

    iflytekApiSecret: string

    API Secret to use when making requests. Defaults to the value of IFLYTEK_API_SECRET environment variable.

    iflytekAppid: string

    APPID to use when making requests. Defaults to the value of IFLYTEK_APPID environment variable.

    lc_serializable: boolean = true
    max_tokens: number = 2048
    streaming: boolean = false
    temperature: number = 0.5

    Amount of randomness injected into the response. Ranges from 0 to 1 (0 is not included). Use temp closer to 0 for analytical / multiple choice, and temp closer to 1 for creative and generative tasks. Defaults to 0.5.

    top_k: number = 4
    userId?: string

    ID of the end-user who made requests.

    version: string = "v3.1"

    Model version to use. Available options are: v1.1, v2.1, v3.1, v3.5, v4.0

    "v3.1"
    

    Accessors

    • get callKeys(): string[]

      Returns string[]

    • get lc_aliases(): undefined | { [key: string]: string }

      Returns undefined | { [key: string]: string }

    • get lc_secrets(): undefined | { [key: string]: string }

      Returns undefined | { [key: string]: string }

    Methods

    • Parameters

      • messages: BaseMessage[]
      • options: unknown
      • OptionalrunManager: any

      Returns Promise<ChatResult>

    • Returns string

    • Calls the Xinghuo API completion.

      Parameters

      • request: ChatCompletionRequest

        The request to send to the Xinghuo API.

      • stream: true
      • Optionalsignal: AbortSignal

        The signal for the API call.

      Returns Promise<IterableReadableStream<string>>

      The response from the Xinghuo API.

    • Calls the Xinghuo API completion.

      Parameters

      • request: ChatCompletionRequest

        The request to send to the Xinghuo API.

      • stream: false
      • Optionalsignal: AbortSignal

        The signal for the API call.

      Returns Promise<ChatCompletionResponse>

      The response from the Xinghuo API.

    • Get the identifying parameters for the model

      Returns {
          chat_id?: string;
          max_tokens?: number;
          streaming: boolean;
          temperature?: number;
          top_k?: number;
          version: string;
      }

    • Get the parameters used to invoke the model

      Returns Omit<ChatCompletionRequest, "messages"> & { streaming: boolean }

    • Method that retrieves the auth websocketStream for making requests to the Iflytek Xinghuo API.

      Type Parameters

      • WebSocketStream

      Parameters

      • options: WebSocketStreamOptions

      Returns Promise<WebSocketStream>

      The auth websocketStream for making requests to the Iflytek Xinghuo API.

    • Returns string