# Class BaseLlm`Abstract`

The BaseLLM class.

#### Hierarchy (View Summary)

- BaseLlm
  - Gemini

- Defined in models/base_llm.ts:36

## Constructors

### constructor

- new BaseLlm(params: { model: string }): BaseLlm

  Creates an instance of BaseLLM.

  #### Parameters

  - params: { model: string }

    The parameters for creating a BaseLlm instance.

    - ##### model: string

      The name of the LLM, e.g. gemini-1.5-flash or gemini-1.5-flash-001.

  #### Returns BaseLlm

  - Defined in models/base_llm.ts:50

## Properties

### `Readonly`[BASE_MODEL_SYMBOL]

"[BASE_MODEL_SYMBOL]": true

A unique symbol to identify BaseLlm classes.

- Defined in models/base_llm.ts:40

### `Readonly` model

model: string

- Defined in models/base_llm.ts:42

### `Static` `Readonly` supportedModels

supportedModels: (string | RegExp)[] = []

List of supported models in regex for LlmRegistry.

- Defined in models/base_llm.ts:57

## Accessors

### `Protected` trackingHeaders

- get trackingHeaders(): Record<string, string>

  #### Returns Record<string, string>

  - Defined in models/base_llm.ts:80

## Methods

### `Abstract` connect

- connect(llmRequest: LlmRequest): Promise<BaseLlmConnection>

  Creates a live connection to the LLM.

  #### Parameters

  - llmRequest: LlmRequest

    LlmRequest, the request to send to the LLM.

  #### Returns Promise<BaseLlmConnection>

  A live connection to the LLM.

  - Defined in models/base_llm.ts:78

### `Abstract` generateContentAsync

- generateContentAsync(
  llmRequest: LlmRequest,
  stream?: boolean,
  ): AsyncGenerator<LlmResponse, void>

  Generates one content from the given contents and tools.

  #### Parameters

  - llmRequest: LlmRequest

    LlmRequest, the request to send to the LLM.

  - `Optional` stream: boolean

    whether to do streaming call. For non-streaming call, it will only yield one Content.

  #### Returns AsyncGenerator<LlmResponse, void>

  A generator of LlmResponse.

  - Defined in models/base_llm.ts:67

### maybeAppendUserContent

- maybeAppendUserContent(llmRequest: LlmRequest): void

  Appends a user content, so that model can continue to output.

  #### Parameters

  - llmRequest: LlmRequest

    LlmRequest, the request to send to the LLM.

  #### Returns void

  - Defined in models/base_llm.ts:94