AxGenerate
Class: AxGenerate<IN, OUT>
Extends
AxProgramWithSignature
<IN
,OUT
>
Extended by
Type Parameters
• IN extends AxGenIn
= AxGenIn
• OUT extends AxGenerateResult
<AxGenOut
> = AxGenerateResult
<AxGenOut
>
Constructors
new AxGenerate()
new AxGenerate<
IN
,OUT
>(ai
,signature
,options
?):AxGenerate
<IN
,OUT
>
Parameters
• ai: AxAIService
• signature: Readonly
<string
| AxSignature
>
• options?: Readonly
<AxGenerateOptions
>
Returns
AxGenerate
<IN
, OUT
>
Overrides
AxProgramWithSignature
.constructor
Defined in
Properties
demos?
protected
optional
demos:Record
<string
,AxFieldValue
>[]
Inherited from
Defined in
examples?
protected
optional
examples:Record
<string
,AxFieldValue
>[]
Inherited from
AxProgramWithSignature
.examples
Defined in
sigHash
protected
sigHash:string
Inherited from
AxProgramWithSignature
.sigHash
Defined in
signature
protected
signature:AxSignature
Inherited from
AxProgramWithSignature
.signature
Defined in
trace?
protected
optional
trace:Record
<string
,AxFieldValue
>
Inherited from
Defined in
usage
protected
usage:AxTokenUsage
&object
[] =[]
Inherited from
Defined in
Methods
addAssert()
addAssert(
fn
,message
?,optional
?):void
Parameters
• fn
• message?: string
• optional?: boolean
Returns
void
Defined in
addStreamingAssert()
addStreamingAssert(
fieldName
,fn
,message
?,optional
?):void
Parameters
• fieldName: string
• fn
• message?: string
• optional?: boolean
Returns
void
Defined in
forward()
forward(
values
,options
?):Promise
<OUT
>
Parameters
• values: IN
• options?: Readonly
<AxProgramForwardOptions
>
Returns
Promise
<OUT
>
Overrides
AxProgramWithSignature
.forward
Defined in
getSignature()
getSignature():
AxSignature
Returns
Inherited from
AxProgramWithSignature
.getSignature
Defined in
getTraces()
getTraces():
AxProgramTrace
[]
Returns
Inherited from
AxProgramWithSignature
.getTraces
Defined in
getUsage()
getUsage():
AxTokenUsage
&object
[]
Returns
AxTokenUsage
& object
[]
Inherited from
AxProgramWithSignature
.getUsage
Defined in
processFunctions()
processFunctions(
functionCalls
,mem
,sessionId
?,traceId
?):Promise
<void
>
Parameters
• functionCalls: readonly AxChatResponseFunctionCall
[]
• mem: Readonly
<AxMemory
>
• sessionId?: string
• traceId?: string
Returns
Promise
<void
>
Defined in
register()
register(
prog
):void
Parameters
• prog: Readonly
<AxTunable
& AxUsable
>
Returns
void
Inherited from
AxProgramWithSignature
.register
Defined in
resetUsage()
resetUsage():
void
Returns
void
Inherited from
AxProgramWithSignature
.resetUsage
Defined in
setDemos()
setDemos(
demos
):void
Parameters
• demos: readonly AxProgramDemos
[]
Returns
void
Inherited from
AxProgramWithSignature
.setDemos
Defined in
setExamples()
setExamples(
examples
):void
Parameters
• examples: Readonly
<AxProgramExamples
>
Returns
void
Inherited from
AxProgramWithSignature
.setExamples
Defined in
setId()
setId(
id
):void
Parameters
• id: string
Returns
void
Inherited from
Defined in
setParentId()
setParentId(
parentId
):void
Parameters
• parentId: string
Returns
void
Inherited from
AxProgramWithSignature
.setParentId