Skip to content

Interface: AiGenerateRequest ​

ctx.ai.generate: an answer to prompt or messages, under instructions, shaped as output asks.

Extends ​

  • AiTarget

Properties ​

connection ​

ts
connection: AiConnection;

Inherited from ​

ts
AiTarget.connection

instructions? ​

ts
optional instructions?: string;

maxOutputTokens? ​

ts
optional maxOutputTokens?: number;

messages? ​

ts
optional messages?: AiMessage[];

model ​

ts
model: string;

Inherited from ​

ts
AiTarget.model

output? ​

ts
optional output?: AiOutput;

Text by default.


prompt? ​

ts
optional prompt?: string;

One of prompt and messages.


seed? ​

ts
optional seed?: number;

stopSequences? ​

ts
optional stopSequences?: string[];

temperature? ​

ts
optional temperature?: number;

timeoutMs? ​

ts
optional timeoutMs?: number;

At most two minutes, and never past the call's own deadline; as long as the call allows by default.

Inherited from ​

ts
AiTarget.timeoutMs

topP? ​

ts
optional topP?: number;

Released under the Apache-2.0 License.