Skip to content

@ralphschuler.ai function caller.index.<internal>.OpenAI.Beta.Chat.Completions

github-actions edited this page Nov 26, 2023 · 1 revision

Class: Completions

Beta.Chat.Completions

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Completions(client): Completions

Parameters

Name Type
client OpenAI

Returns

Completions

Inherited from

APIResource.constructor

Defined in

node_modules/openai/resource.d.ts:4

Properties

_client

Protected _client: OpenAI

Inherited from

APIResource._client

Defined in

node_modules/openai/resource.d.ts:3

Methods

runFunctions

runFunctions<FunctionsArgs>(body, options?): ChatCompletionRunner

A convenience helper for using function calls with the /chat/completions endpoint which automatically calls the JavaScript functions you provide and sends their results back to the /chat/completions endpoint, looping as long as the model requests function calls.

For more details and examples, see the docs

Type parameters

Name Type
FunctionsArgs extends BaseFunctionsArgs

Parameters

Name Type
body ChatCompletionFunctionRunnerParams<FunctionsArgs>
options? RequestOptions<Readable | Record<string, unknown>>

Returns

ChatCompletionRunner

Defined in

node_modules/openai/resources/beta/chat/completions.d.ts:25

runFunctions<FunctionsArgs>(body, options?): ChatCompletionStreamingRunner

Type parameters

Name Type
FunctionsArgs extends BaseFunctionsArgs

Parameters

Name Type
body ChatCompletionStreamingFunctionRunnerParams<FunctionsArgs>
options? RequestOptions<Readable | Record<string, unknown>>

Returns

ChatCompletionStreamingRunner

Defined in

node_modules/openai/resources/beta/chat/completions.d.ts:26


runTools

runTools<FunctionsArgs>(body, options?): ChatCompletionRunner

A convenience helper for using tool calls with the /chat/completions endpoint which automatically calls the JavaScript functions you provide and sends their results back to the /chat/completions endpoint, looping as long as the model requests function calls.

For more details and examples, see the docs

Type parameters

Name Type
FunctionsArgs extends BaseFunctionsArgs

Parameters

Name Type
body ChatCompletionToolRunnerParams<FunctionsArgs>
options? RequestOptions<Readable | Record<string, unknown>>

Returns

ChatCompletionRunner

Defined in

node_modules/openai/resources/beta/chat/completions.d.ts:36

runTools<FunctionsArgs>(body, options?): ChatCompletionStreamingRunner

Type parameters

Name Type
FunctionsArgs extends BaseFunctionsArgs

Parameters

Name Type
body ChatCompletionStreamingToolRunnerParams<FunctionsArgs>
options? RequestOptions<Readable | Record<string, unknown>>

Returns

ChatCompletionStreamingRunner

Defined in

node_modules/openai/resources/beta/chat/completions.d.ts:37


stream

stream(body, options?): ChatCompletionStream

Creates a chat completion stream

Parameters

Name Type
body ChatCompletionStreamParams
options? RequestOptions<Readable | Record<string, unknown>>

Returns

ChatCompletionStream

Defined in

node_modules/openai/resources/beta/chat/completions.d.ts:41

Typescript Libraries

Modules

Namespaces

Clone this wiki locally