Skip to main content

Interface: ToolCallsGenerationModel<PROMPT, SETTINGS>

Type parameters

NameType
PROMPTPROMPT
SETTINGSextends ToolCallsGenerationModelSettings

Hierarchy

  • Model<SETTINGS>

    ToolCallsGenerationModel

Implemented by

Accessors

settingsForEvent

get settingsForEvent(): Partial<SETTINGS>

Returns settings that should be recorded in observability events. Security-related settings (e.g. API keys) should not be included here.

Returns

Partial<SETTINGS>

Inherited from

Model.settingsForEvent

Defined in

packages/modelfusion/src/model-function/Model.ts:19

Methods

doGenerateToolCalls

doGenerateToolCalls(tools, prompt, options?): PromiseLike<{ rawResponse: unknown ; text: null | string ; toolCalls: null | { args: unknown ; id: string ; name: string }[] ; usage?: { completionTokens: number ; promptTokens: number ; totalTokens: number } }>

Parameters

NameType
toolsToolDefinition<string, unknown>[]
promptPROMPT
options?FunctionOptions

Returns

PromiseLike<{ rawResponse: unknown ; text: null | string ; toolCalls: null | { args: unknown ; id: string ; name: string }[] ; usage?: { completionTokens: number ; promptTokens: number ; totalTokens: number } }>

Defined in

packages/modelfusion/src/tool/generate-tool-calls/ToolCallsGenerationModel.ts:11


withSettings

withSettings(additionalSettings): this

The withSettings method creates a new model with the same configuration as the original model, but with the specified settings changed.

Parameters

NameType
additionalSettingsPartial<SETTINGS>

Returns

this

Example

const model = new OpenAICompletionModel({
model: "gpt-3.5-turbo-instruct",
maxGenerationTokens: 500,
});

const modelWithMoreTokens = model.withSettings({
maxGenerationTokens: 1000,
});

Inherited from

Model.withSettings

Defined in

packages/modelfusion/src/model-function/Model.ts:34

Properties

modelInformation

modelInformation: ModelInformation

Inherited from

Model.modelInformation

Defined in

packages/modelfusion/src/model-function/Model.ts:12


settings

Readonly settings: SETTINGS

Inherited from

Model.settings

Defined in

packages/modelfusion/src/model-function/Model.ts:13