langchain.js
    Preparing search index...

    To use this model you need to have the Built-in AI Early Preview Program for Chrome. You can find more information about the program here:

    // Initialize the ChromeAI model.
    const model = new ChromeAI({
    temperature: 0.5, // Optional. Default is 0.5.
    topK: 40, // Optional. Default is 40.
    });

    // Call the model with a message and await the response.
    const response = await model.invoke([
    new HumanMessage({ content: "My name is John." }),
    ]);

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      Returns ChromeAI

    Properties

    systemPrompt?: string
    temperature?: number
    topK?: number

    Methods

    • Parameters

      • prompt: string
      • options: unknown
      • OptionalrunManager: any

      Returns Promise<string>

    • Returns string

    • Parameters

      • prompt: string
      • _options: unknown
      • OptionalrunManager: any

      Returns AsyncGenerator<GenerationChunk>

    • Initialize the model. This method may be called before invoking the model to set up a chat session in advance.

      Returns Promise<any>

    • Returns string