GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ADK for TypeScript: API Reference

This view

  • Original page
  • New address

GeezerVison is showing adk.dev — RoutedLlm | ADK for TypeScript: API Reference - v2.5.0

  • RoutedLlm

Class RoutedLlm

A BaseLlm implementation that delegates to one of multiple models based on a router function.

Hierarchy (View Summary)

  • BaseLlm
    • RoutedLlm
  • Defined in core/src/models/routed_llm.ts:27

Constructors

constructor

  • new RoutedLlm(
        __namedParameters: {
            modelName?: string;
            models: Readonly<Record<string, BaseLlm>> | BaseLlm[];
            router: LlmRouter;
        },
    ): RoutedLlm

    Parameters

    • __namedParameters: {
          modelName?: string;
          models: Readonly<Record<string, BaseLlm>> | BaseLlm[];
          router: LlmRouter;
      }

    Returns RoutedLlm

    Overrides BaseLlm.constructor

    • Defined in core/src/models/routed_llm.ts:31

Properties

Readonly[BASE_MODEL_SYMBOL]

"[BASE_MODEL_SYMBOL]": true

A unique symbol to identify BaseLlm classes.

Inherited from BaseLlm.[BASE_MODEL_SYMBOL]

  • Defined in core/src/models/base_llm.ts:40

Readonlymodel

model: string

Inherited from BaseLlm.model

  • Defined in core/src/models/base_llm.ts:42

Static ReadonlysupportedModels

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

List of supported models in regex for LlmRegistry.

Inherited from BaseLlm.supportedModels

  • Defined in core/src/models/base_llm.ts:57

Accessors

ProtectedtrackingHeaders

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

    Returns Record<string, string>

    Inherited from BaseLlm.trackingHeaders

    • Defined in core/src/models/base_llm.ts:81

Methods

connect

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

    Creates a live connection to the LLM by delegating to the selected model. This live connection cannot be switched mid-stream, it is tied to the model selected at the time of connection.

    Parameters

    • llmRequest: LlmRequest

    Returns Promise<BaseLlmConnection>

    Overrides BaseLlm.connect

    • Defined in core/src/models/routed_llm.ts:76

generateContentAsync

  • generateContentAsync(
        llmRequest: LlmRequest,
        stream?: boolean,
        abortSignal?: AbortSignal,
    ): AsyncGenerator<LlmResponse, void>

    Generates content by delegating to the selected model.

    Parameters

    • llmRequest: LlmRequest
    • Optionalstream: boolean
    • OptionalabortSignal: AbortSignal

    Returns AsyncGenerator<LlmResponse, void>

    Overrides BaseLlm.generateContentAsync

    • Defined in core/src/models/routed_llm.ts:57

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

    Inherited from BaseLlm.maybeAppendUserContent

    • Defined in core/src/models/base_llm.ts:90
Constructors
constructor
Properties
[BASE_MODEL_SYMBOL]modelsupportedModels
Accessors
trackingHeaders
Methods
connectgenerateContentAsyncmaybeAppendUserContent
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.