AxDefaultResultReranker
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/docs/reranker.ts#L11
Extends
Constructors
Constructor
new AxDefaultResultReranker(options?: Readonly<AxProgramForwardOptions<string>>): AxDefaultResultReranker;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/docs/reranker.ts#L15
Parameters
| Parameter | Type |
|---|---|
options? | Readonly<AxProgramForwardOptions<string>> |
Returns
AxDefaultResultReranker
Overrides
Methods
_forward1()
_forward1(
ai: Readonly<AxAIService>,
values:
| AxRerankerIn
| AxMessage<AxRerankerIn>[],
options: Readonly<AxProgramForwardOptions<any>>): AxGenStreamingOut<AxRerankerOut>;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/generate.ts#L815
Parameters
| Parameter | Type |
|---|---|
ai | Readonly<AxAIService> |
values | | AxRerankerIn | AxMessage<AxRerankerIn>[] |
options | Readonly<AxProgramForwardOptions<any>> |
Returns
AxGenStreamingOut<AxRerankerOut>
Inherited from
addAssert()
addAssert(fn: (values: AxRerankerOut) =>
| undefined
| string
| boolean
| Promise<undefined | string | boolean>, message?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/generate.ts#L199
Parameters
| Parameter | Type |
|---|---|
fn | (values: AxRerankerOut) => | undefined | string | boolean | Promise<undefined | string | boolean> |
message? | string |
Returns
void
Inherited from
addFieldProcessor()
addFieldProcessor(fieldName: "rankedItems", fn: (value: string[], context?: object) => unknown): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/generate.ts#L274
Parameters
| Parameter | Type |
|---|---|
fieldName | "rankedItems" |
fn | (value: string[], context?: object) => unknown |
Returns
void
Inherited from
addStreamingAssert()
addStreamingAssert(
fieldName: "rankedItems",
fn: (content: string, done?: boolean) => undefined | string | boolean,
message?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/generate.ts#L203
Parameters
| Parameter | Type |
|---|---|
fieldName | "rankedItems" |
fn | (content: string, done?: boolean) => undefined | string | boolean |
message? | string |
Returns
void
Inherited from
addStreamingFieldProcessor()
addStreamingFieldProcessor(fieldName: "rankedItems", fn: (value: string, context?: object) => unknown): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/generate.ts#L260
Parameters
| Parameter | Type |
|---|---|
fieldName | "rankedItems" |
fn | (value: string, context?: object) => unknown |
Returns
void
Inherited from
AxGen.addStreamingFieldProcessor
applyOptimization()
applyOptimization(optimizedProgram: AxOptimizedProgram<AxRerankerOut>): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L213
Apply optimized configuration to this program
Parameters
| Parameter | Type | Description |
|---|---|---|
optimizedProgram | AxOptimizedProgram<AxRerankerOut> | The optimized program configuration to apply |
Returns
void
Inherited from
forward()
forward<T>(
ai: T,
input: Readonly<AxRerankerIn>,
options?: Readonly<AxProgramForwardOptionsWithModels<T>>): Promise<AxRerankerOut>;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/docs/reranker.ts#L22
Type Parameters
| Type Parameter |
|---|
T extends Readonly<AxAIService<unknown, unknown, string>> |
Parameters
| Parameter | Type |
|---|---|
ai | T |
input | Readonly<AxRerankerIn> |
options? | Readonly<AxProgramForwardOptionsWithModels<T>> |
Returns
Promise<AxRerankerOut>
Overrides
getSignature()
getSignature(): AxSignature;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L56
Returns
Inherited from
getTraces()
getTraces(): AxProgramTrace<AxRerankerIn, AxRerankerOut>[];
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L154
Returns
AxProgramTrace<AxRerankerIn, AxRerankerOut>[]
Inherited from
getUsage()
getUsage(): AxModelUsage & object[];
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L168
Returns
AxModelUsage & object[]
Inherited from
register()
register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L84
Parameters
| Parameter | Type |
|---|---|
prog | Readonly<AxTunable<IN, OUT> & AxUsable> |
Returns
void
Inherited from
resetUsage()
resetUsage(): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L178
Returns
void
Inherited from
setDemos()
setDemos(demos: readonly AxProgramDemos<AxRerankerIn, AxRerankerOut>[]): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L185
Parameters
| Parameter | Type |
|---|---|
demos | readonly AxProgramDemos<AxRerankerIn, AxRerankerOut>[] |
Returns
void
Inherited from
setDescription()
setDescription(description: string): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L74
Parameters
| Parameter | Type |
|---|---|
description | string |
Returns
void
Inherited from
setExamples()
setExamples(examples: Readonly<AxProgramExamples<AxRerankerIn, AxRerankerOut>>, options?: Readonly<AxSetExamplesOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/generate.ts#L1164
Parameters
| Parameter | Type |
|---|---|
examples | Readonly<AxProgramExamples<AxRerankerIn, AxRerankerOut>> |
options? | Readonly<AxSetExamplesOptions> |
Returns
void
Inherited from
setId()
setId(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L91
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
void
Inherited from
setParentId()
setParentId(parentId: string): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L98
Parameters
| Parameter | Type |
|---|---|
parentId | string |
Returns
void
Inherited from
setSignature()
setSignature(signature:
| undefined
| Readonly<
| string
| AxSignatureConfig
| AxSignature<Record<string, any>, Record<string, any>>>): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/program.ts#L60
Parameters
| Parameter | Type |
|---|---|
signature | | undefined | Readonly< | string | AxSignatureConfig | AxSignature<Record<string, any>, Record<string, any>>> |
Returns
void
Inherited from
streamingForward()
streamingForward<T>(
ai: T,
values:
| AxRerankerIn
| AxMessage<AxRerankerIn>[],
options?: Readonly<AxProgramStreamingForwardOptionsWithModels<T>>): AxGenStreamingOut<AxRerankerOut>;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/generate.ts#L1075
Type Parameters
| Type Parameter |
|---|
T extends Readonly<AxAIService<unknown, unknown, string>> |
Parameters
| Parameter | Type |
|---|---|
ai | T |
values | | AxRerankerIn | AxMessage<AxRerankerIn>[] |
options? | Readonly<AxProgramStreamingForwardOptionsWithModels<T>> |
Returns
AxGenStreamingOut<AxRerankerOut>
Inherited from
updateMeter()
updateMeter(meter?: Meter): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/dsp/generate.ts#L179
Parameters
| Parameter | Type |
|---|---|
meter? | Meter |
Returns
void