@ax-llm/ax 10.0.16 → 10.0.18

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.
Files changed (49) hide show
  1. package/ai/google-gemini/api.js +15 -12
  2. package/ai/google-gemini/api.js.map +1 -1
  3. package/ai/google-gemini/types.d.ts +10 -8
  4. package/cjs/ai/google-gemini/api.js +15 -12
  5. package/cjs/ai/google-gemini/api.js.map +1 -1
  6. package/cjs/ai/google-gemini/types.d.ts +10 -8
  7. package/cjs/dsp/extract.js +14 -8
  8. package/cjs/dsp/extract.js.map +1 -1
  9. package/cjs/dsp/functions.js +13 -23
  10. package/cjs/dsp/functions.js.map +1 -1
  11. package/cjs/dsp/generate.d.ts +0 -2
  12. package/cjs/dsp/generate.js +13 -47
  13. package/cjs/dsp/generate.js.map +1 -1
  14. package/cjs/dsp/program.d.ts +4 -2
  15. package/cjs/dsp/program.js.map +1 -1
  16. package/cjs/dsp/prompt.d.ts +4 -3
  17. package/cjs/dsp/prompt.js +69 -60
  18. package/cjs/dsp/prompt.js.map +1 -1
  19. package/cjs/prompts/agent.d.ts +0 -1
  20. package/cjs/prompts/agent.js +6 -9
  21. package/cjs/prompts/agent.js.map +1 -1
  22. package/cjs/prompts/index.d.ts +0 -1
  23. package/cjs/prompts/index.js +0 -1
  24. package/cjs/prompts/index.js.map +1 -1
  25. package/dsp/extract.js +14 -8
  26. package/dsp/extract.js.map +1 -1
  27. package/dsp/functions.js +13 -23
  28. package/dsp/functions.js.map +1 -1
  29. package/dsp/generate.d.ts +0 -2
  30. package/dsp/generate.js +13 -46
  31. package/dsp/generate.js.map +1 -1
  32. package/dsp/program.d.ts +4 -2
  33. package/dsp/program.js.map +1 -1
  34. package/dsp/prompt.d.ts +4 -3
  35. package/dsp/prompt.js +67 -59
  36. package/dsp/prompt.js.map +1 -1
  37. package/package.json +1 -1
  38. package/prompts/agent.d.ts +0 -1
  39. package/prompts/agent.js +7 -10
  40. package/prompts/agent.js.map +1 -1
  41. package/prompts/index.d.ts +0 -1
  42. package/prompts/index.js +0 -1
  43. package/prompts/index.js.map +1 -1
  44. package/cjs/prompts/react.d.ts +0 -7
  45. package/cjs/prompts/react.js +0 -30
  46. package/cjs/prompts/react.js.map +0 -1
  47. package/prompts/react.d.ts +0 -7
  48. package/prompts/react.js +0 -26
  49. package/prompts/react.js.map +0 -1
@@ -1,7 +0,0 @@
1
- import type { AxGenOptions } from '../dsp/generate.js';
2
- import type { AxGenIn, AxGenOut } from '../dsp/program.js';
3
- import { AxSignature } from '../dsp/sig.js';
4
- import { AxChainOfThought } from './cot.js';
5
- export declare class AxReAct<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> extends AxChainOfThought<IN, OUT> {
6
- constructor(signature: Readonly<AxSignature | string>, options: Readonly<AxGenOptions>);
7
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AxReAct = void 0;
4
- const sig_js_1 = require("../dsp/sig.js");
5
- const cot_js_1 = require("./cot.js");
6
- class AxReAct extends cot_js_1.AxChainOfThought {
7
- constructor(signature, options) {
8
- const fnNames = options.functions?.map((f) => {
9
- if ('toFunction' in f) {
10
- return f.toFunction().name;
11
- }
12
- return f.name;
13
- });
14
- const funcList = fnNames?.map((fname) => `'${fname}'`).join(', ');
15
- const sig = new sig_js_1.AxSignature(signature);
16
- if (funcList && funcList.length > 0) {
17
- sig.setDescription(`Use the following functions ${funcList} to complete the task and return the result. The functions must be used to resolve the final result values`);
18
- }
19
- // sig.addInputField({
20
- // name: 'observation',
21
- // description: 'Result value from executed function',
22
- // isOptional: true,
23
- // type: { name: 'string', isArray: true }
24
- // });
25
- sig.setOutputFields(sig.getOutputFields().map((v) => ({ ...v, isOptional: true })));
26
- super(sig, options);
27
- }
28
- }
29
- exports.AxReAct = AxReAct;
30
- //# sourceMappingURL=react.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react.js","sourceRoot":"","sources":["../../../prompts/react.ts"],"names":[],"mappings":";;;AAEA,0CAA4C;AAE5C,qCAA4C;AAE5C,MAAa,OAGX,SAAQ,yBAAyB;IACjC,YACE,SAAyC,EACzC,OAA+B;QAE/B,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAC3C,IAAI,YAAY,IAAI,CAAC,EAAE,CAAC;gBACtB,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC;YAC7B,CAAC;YACD,OAAO,CAAC,CAAC,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,OAAO,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElE,MAAM,GAAG,GAAG,IAAI,oBAAW,CAAC,SAAS,CAAC,CAAC;QAEvC,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpC,GAAG,CAAC,cAAc,CAChB,+BAA+B,QAAQ,4GAA4G,CACpJ,CAAC;QACJ,CAAC;QAED,sBAAsB;QACtB,yBAAyB;QACzB,wDAAwD;QACxD,sBAAsB;QACtB,4CAA4C;QAC5C,MAAM;QAEN,GAAG,CAAC,eAAe,CACjB,GAAG,CAAC,eAAe,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAC/D,CAAC;QAEF,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACtB,CAAC;CACF;AAtCD,0BAsCC"}
@@ -1,7 +0,0 @@
1
- import type { AxGenOptions } from '../dsp/generate.js';
2
- import type { AxGenIn, AxGenOut } from '../dsp/program.js';
3
- import { AxSignature } from '../dsp/sig.js';
4
- import { AxChainOfThought } from './cot.js';
5
- export declare class AxReAct<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> extends AxChainOfThought<IN, OUT> {
6
- constructor(signature: Readonly<AxSignature | string>, options: Readonly<AxGenOptions>);
7
- }
package/prompts/react.js DELETED
@@ -1,26 +0,0 @@
1
- import { AxSignature } from '../dsp/sig.js';
2
- import { AxChainOfThought } from './cot.js';
3
- export class AxReAct extends AxChainOfThought {
4
- constructor(signature, options) {
5
- const fnNames = options.functions?.map((f) => {
6
- if ('toFunction' in f) {
7
- return f.toFunction().name;
8
- }
9
- return f.name;
10
- });
11
- const funcList = fnNames?.map((fname) => `'${fname}'`).join(', ');
12
- const sig = new AxSignature(signature);
13
- if (funcList && funcList.length > 0) {
14
- sig.setDescription(`Use the following functions ${funcList} to complete the task and return the result. The functions must be used to resolve the final result values`);
15
- }
16
- // sig.addInputField({
17
- // name: 'observation',
18
- // description: 'Result value from executed function',
19
- // isOptional: true,
20
- // type: { name: 'string', isArray: true }
21
- // });
22
- sig.setOutputFields(sig.getOutputFields().map((v) => ({ ...v, isOptional: true })));
23
- super(sig, options);
24
- }
25
- }
26
- //# sourceMappingURL=react.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react.js","sourceRoot":"","sources":["../../prompts/react.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,OAAO,OAGX,SAAQ,gBAAyB;IACjC,YACE,SAAyC,EACzC,OAA+B;QAE/B,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAC3C,IAAI,YAAY,IAAI,CAAC,EAAE,CAAC;gBACtB,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC;YAC7B,CAAC;YACD,OAAO,CAAC,CAAC,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,MAAM,QA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