Skip to Content
API ReferenceClassesClass: AiOneShot

Class: AiOneShot

Defined in: src/libs/ai_one_shot.ts:20 

Constructors

Constructor

new AiOneShot(): AiOneShot

Returns

AiOneShot

Methods

complete()

static complete(__namedParameters): Promise<string>

Defined in: src/libs/ai_one_shot.ts:26 

Run one system+user prompt against modelSpec (e.g. ‘openai/gpt-4.1-mini’) and return the trimmed text reply. bucketId attributes the spend in the cost tracker. Throws if the model returns no content.

Parameters

__namedParameters
bucketId

string

modelSpec

string

system

string

user

string

Returns

Promise<string>

Last updated on