OpenAIChatCompletionsModel
A model that uses (or is compatible with) OpenAI’s Chat Completions API.
Implements
Section titled “Implements”Model
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new OpenAIChatCompletionsModel(client, model): OpenAIChatCompletionsModel
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
|
|
|
|
Returns
Section titled “Returns”OpenAIChatCompletionsModel
Methods
Section titled “Methods”getResponse()
Section titled “getResponse()”getResponse(request): Promise<ModelResponse>
Get a response from the model.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
|
|
The request to get a response for. |
Returns
Section titled “Returns”Promise
<ModelResponse
>
Implementation of
Section titled “Implementation of”Model.getResponse
getStreamedResponse()
Section titled “getStreamedResponse()”getStreamedResponse(request): AsyncIterable<StreamEvent>
Get a streamed response from the model.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
|
|
Returns
Section titled “Returns”AsyncIterable
<StreamEvent
>
Implementation of
Section titled “Implementation of”Model.getStreamedResponse