CostReportingLLMist
Defined in: gadgets/types.ts:445
Properties
Section titled “Properties”
readonlyimage:CostReportingImageNamespace
Defined in: gadgets/types.ts:473
Image generation with automatic cost reporting. Costs are reported based on model and generation parameters.
modelRegistry
Section titled “modelRegistry”
readonlymodelRegistry:ModelRegistry
Defined in: gadgets/types.ts:467
Access to model registry for cost estimation.
speech
Section titled “speech”
readonlyspeech:CostReportingSpeechNamespace
Defined in: gadgets/types.ts:479
Speech generation with automatic cost reporting. Costs are reported based on input length and model pricing.
Methods
Section titled “Methods”complete()
Section titled “complete()”complete(
prompt,options?):Promise<string>
Defined in: gadgets/types.ts:450
Quick completion - returns final text response. Costs are automatically reported to the execution context.
Parameters
Section titled “Parameters”prompt
Section titled “prompt”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<string>
stream()
Section titled “stream()”stream(
options):LLMStream
Defined in: gadgets/types.ts:462
Low-level stream access for full control. Costs are automatically reported based on usage metadata in chunks.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”streamText()
Section titled “streamText()”streamText(
prompt,options?):AsyncGenerator<string>
Defined in: gadgets/types.ts:456
Quick streaming - returns async generator of text chunks. Costs are automatically reported when the stream completes.
Parameters
Section titled “Parameters”prompt
Section titled “prompt”string
options?
Section titled “options?”Returns
Section titled “Returns”AsyncGenerator<string>