Hierarchy (view full)

Constructors

Accessors

  • get chatCtx(): ChatContext
  • The initial chat context of this stream.

    Returns ChatContext

  • get connOptions(): APIConnectOptions
  • The connection options for this stream.

    Returns APIConnectOptions

  • get toolCtx(): undefined | ToolContext<unknown>
  • The function context of this stream.

    Returns undefined | ToolContext<unknown>

Methods

  • Returns void

  • Collect the entire stream into a single response.

    Returns Promise<CollectedResponse>

    Example

    const response = await myLlm.chat({ chatCtx, toolCtx }).collect();

    for (const tc of response.toolCalls) {
    // execute the tool call...
    }
  • Returns Promise<IteratorResult<ChatChunk, any>>