Skip to content

Model

The base interface for calling an LLM.

getResponse(request): Promise<ModelResponse>

Get a response from the model.

Parameter Type Description

request

ModelRequest

The request to get a response for.

Promise<ModelResponse>


getStreamedResponse(request): AsyncIterable<StreamEvent>

Get a streamed response from the model.

Parameter Type

request

ModelRequest

AsyncIterable<StreamEvent>