@ax-llm/ax 16.0.6 → 16.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.cts CHANGED
@@ -680,6 +680,16 @@ type AxAIServiceOptions = {
680
680
  * Currently supported by: Google Gemini/Vertex AI
681
681
  */
682
682
  contextCache?: AxContextCacheOptions;
683
+ /**
684
+ * When true, examples/demos are embedded in system prompt (legacy).
685
+ * When false (default), they are rendered as alternating user/assistant message pairs.
686
+ */
687
+ examplesInSystem?: boolean;
688
+ /**
689
+ * Custom labels to include in OpenTelemetry metrics.
690
+ * These labels are merged with axGlobals.customLabels (service-level overrides global).
691
+ */
692
+ customLabels?: Record<string, string>;
683
693
  };
684
694
  interface AxAIService<TModel = unknown, TEmbedModel = unknown, TModelKey = string> {
685
695
  getId(): string;
@@ -2055,6 +2065,7 @@ declare class AxGen<IN = any, OUT extends AxGenOut = any> extends AxProgram<IN,
2055
2065
  getInstruction(): string | undefined;
2056
2066
  private getSignatureName;
2057
2067
  private getMetricsInstruments;
2068
+ private getMergedCustomLabels;
2058
2069
  updateMeter(meter?: Meter): void;
2059
2070
  private createStates;
2060
2071
  addAssert: (fn: AxAssertion<OUT>["fn"], message?: string) => void;
@@ -2662,6 +2673,7 @@ declare class AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatRe
2662
2673
  private logger;
2663
2674
  private corsProxy?;
2664
2675
  private retry?;
2676
+ private customLabels?;
2665
2677
  private modelInfo;
2666
2678
  private modelUsage?;
2667
2679
  private embedModelUsage?;
@@ -2685,6 +2697,7 @@ declare class AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatRe
2685
2697
  setOptions(options: Readonly<AxAIServiceOptions>): void;
2686
2698
  getOptions(): Readonly<AxAIServiceOptions>;
2687
2699
  getLogger(): AxLoggerFunction;
2700
+ private getMergedCustomLabels;
2688
2701
  getModelList(): ({
2689
2702
  readonly key: TModelKey;
2690
2703
  readonly description: string;
@@ -6138,6 +6151,7 @@ declare const axGlobals: {
6138
6151
  optimizerLogger: AxOptimizerLoggerFunction | undefined;
6139
6152
  debug: boolean | undefined;
6140
6153
  abortSignal: AbortSignal | undefined;
6154
+ customLabels: Record<string, string> | undefined;
6141
6155
  cachingFunction: ((key: string, value?: AxGenOut) => AxGenOut | undefined | Promise<AxGenOut | undefined>) | undefined;
6142
6156
  functionResultFormatter: AxFunctionResultFormatter;
6143
6157
  };
package/index.d.ts CHANGED
@@ -680,6 +680,16 @@ type AxAIServiceOptions = {
680
680
  * Currently supported by: Google Gemini/Vertex AI
681
681
  */
682
682
  contextCache?: AxContextCacheOptions;
683
+ /**
684
+ * When true, examples/demos are embedded in system prompt (legacy).
685
+ * When false (default), they are rendered as alternating user/assistant message pairs.
686
+ */
687
+ examplesInSystem?: boolean;
688
+ /**
689
+ * Custom labels to include in OpenTelemetry metrics.
690
+ * These labels are merged with axGlobals.customLabels (service-level overrides global).
691
+ */
692
+ customLabels?: Record<string, string>;
683
693
  };
684
694
  interface AxAIService<TModel = unknown, TEmbedModel = unknown, TModelKey = string> {
685
695
  getId(): string;
@@ -2055,6 +2065,7 @@ declare class AxGen<IN = any, OUT extends AxGenOut = any> extends AxProgram<IN,
2055
2065
  getInstruction(): string | undefined;
2056
2066
  private getSignatureName;
2057
2067
  private getMetricsInstruments;
2068
+ private getMergedCustomLabels;
2058
2069
  updateMeter(meter?: Meter): void;
2059
2070
  private createStates;
2060
2071
  addAssert: (fn: AxAssertion<OUT>["fn"], message?: string) => void;
@@ -2662,6 +2673,7 @@ declare class AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatRe
2662
2673
  private logger;
2663
2674
  private corsProxy?;
2664
2675
  private retry?;
2676
+ private customLabels?;
2665
2677
  private modelInfo;
2666
2678
  private modelUsage?;
2667
2679
  private embedModelUsage?;
@@ -2685,6 +2697,7 @@ declare class AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatRe
2685
2697
  setOptions(options: Readonly<AxAIServiceOptions>): void;
2686
2698
  getOptions(): Readonly<AxAIServiceOptions>;
2687
2699
  getLogger(): AxLoggerFunction;
2700
+ private getMergedCustomLabels;
2688
2701
  getModelList(): ({
2689
2702
  readonly key: TModelKey;
2690
2703
  readonly description: string;
@@ -6138,6 +6151,7 @@ declare const axGlobals: {
6138
6151
  optimizerLogger: AxOptimizerLoggerFunction | undefined;
6139
6152
  debug: boolean | undefined;
6140
6153
  abortSignal: AbortSignal | undefined;
6154
+ customLabels: Record<string, string> | undefined;
6141
6155
  cachingFunction: ((key: string, value?: AxGenOut) => AxGenOut | undefined | Promise<AxGenOut | undefined>) | undefined;
6142
6156
  functionResultFormatter: AxFunctionResultFormatter;
6143
6157
  };