Interface LanguageModelExchangeRequest

Represents a request to a language model within an exchange unit, capturing the request and its response.

interface LanguageModelExchangeRequest {
    id: string;
    languageModel: string;
    metadata: {
        agent?: string;
        timestamp?: number;
        [key: string]: unknown;
    };
    request: LanguageModelRequest;
    response: LanguageModelExchangeRequestResponse;
}

Properties

id: string

Identifier of the request. Might share the id with the parent exchange if there's only one request.

languageModel: string

The identifier of the language model the request was sent to

metadata: {
    agent?: string;
    timestamp?: number;
    [key: string]: unknown;
}

Arbitrary metadata for the request. Might contain an agent id and timestamp.

Type declaration

  • [key: string]: unknown
  • Optional agent?: string
  • Optional timestamp?: number

The actual request sent to the language model

The recorded response