@nexface/chat 0.1.13 → 0.1.15-alpha.0

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/dist/config.d.ts CHANGED
@@ -12,7 +12,7 @@ export type NexfaceModelConfig = (CompletionsOptions & {
12
12
  }) | (GoogleOptions & {
13
13
  protocol: "google-generative-ai";
14
14
  });
15
- export type NexfaceAgentConfig = Pick<Parameters<typeof createAgent>[0], "tools" | "skills" | "maxSteps" | "maxRetries" | "applicationContext"> & {
15
+ export type NexfaceAgentConfig = Pick<Parameters<typeof createAgent>[0], "tools" | "toolRegistry" | "skills" | "maxSteps" | "maxRetries" | "applicationContext"> & {
16
16
  model: NexfaceModelConfig;
17
17
  /**
18
18
  * @experimental Page decisions may change in future releases.
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,IAAI,WAAW,EAAiD,MAAM,mCAAmC,CAAC;AACpI,OAAO,EAAE,iBAAiB,IAAI,SAAS,EAA+C,MAAM,iCAAiC,CAAC;AAC9H,OAAO,EAAE,iBAAiB,IAAI,SAAS,EAA+C,MAAM,mCAAmC,CAAC;AAChI,OAAO,EAAE,iBAAiB,IAAI,MAAM,EAA4C,MAAM,qCAAqC,CAAC;AAoB5H,MAAM,UAAU,kBAAkB,CAAC,MAA0B;IAC3D,QAAQ,MAAM,CAAC,QAAQ,EAAE,CAAC;QACxB,KAAK,SAAS,CAAC;QACf,KAAK,oBAAoB,CAAC,CAAC,CAAC;YAC1B,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;YACxC,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;QACD,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACxB,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;YACxC,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;QACD,KAAK,oBAAoB,CAAC,CAAC,CAAC;YAC1B,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;YACxC,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;QACD,KAAK,sBAAsB,CAAC,CAAC,CAAC;YAC5B,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;YACxC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC","sourcesContent":["import type { createAgent } from \"@nexface/agent\";\nimport { createModelConfig as completions, type ModelConfigOptions as CompletionsOptions } from \"@nexface/agent/openai-completions\";\nimport { createModelConfig as responses, type ModelConfigOptions as ResponsesOptions } from \"@nexface/agent/openai-responses\";\nimport { createModelConfig as anthropic, type ModelConfigOptions as AnthropicOptions } from \"@nexface/agent/anthropic-messages\";\nimport { createModelConfig as google, type ModelConfigOptions as GoogleOptions } from \"@nexface/agent/google-generative-ai\";\n\nexport type NexfaceModelConfig =\n | (CompletionsOptions & { protocol?: \"openai-completions\" })\n | (ResponsesOptions & { protocol: \"openai-responses\" })\n | (AnthropicOptions & { protocol: \"anthropic-messages\" })\n | (GoogleOptions & { protocol: \"google-generative-ai\" });\n\nexport type NexfaceAgentConfig = Pick<\n Parameters<typeof createAgent>[0],\n \"tools\" | \"skills\" | \"maxSteps\" | \"maxRetries\" | \"applicationContext\"\n> & {\n model: NexfaceModelConfig;\n /**\n * @experimental Page decisions may change in future releases.\n * @beta\n */\n pageDecision?: NonNullable<Parameters<typeof createAgent>[0][\"pageDecision\"]>;\n};\n\nexport function resolveModelConfig(config: NexfaceModelConfig) {\n switch (config.protocol) {\n case undefined:\n case \"openai-completions\": {\n const { protocol, ...options } = config;\n return completions(options);\n }\n case \"openai-responses\": {\n const { protocol, ...options } = config;\n return responses(options);\n }\n case \"anthropic-messages\": {\n const { protocol, ...options } = config;\n return anthropic(options);\n }\n case \"google-generative-ai\": {\n const { protocol, ...options } = config;\n return google(options);\n }\n default:\n throw new Error(\"Unsupported Nexface model protocol.\");\n }\n}\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,IAAI,WAAW,EAAiD,MAAM,mCAAmC,CAAC;AACpI,OAAO,EAAE,iBAAiB,IAAI,SAAS,EAA+C,MAAM,iCAAiC,CAAC;AAC9H,OAAO,EAAE,iBAAiB,IAAI,SAAS,EAA+C,MAAM,mCAAmC,CAAC;AAChI,OAAO,EAAE,iBAAiB,IAAI,MAAM,EAA4C,MAAM,qCAAqC,CAAC;AAoB5H,MAAM,UAAU,kBAAkB,CAAC,MAA0B;IAC3D,QAAQ,MAAM,CAAC,QAAQ,EAAE,CAAC;QACxB,KAAK,SAAS,CAAC;QACf,KAAK,oBAAoB,CAAC,CAAC,CAAC;YAC1B,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;YACxC,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;QACD,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACxB,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;YACxC,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;QACD,KAAK,oBAAoB,CAAC,CAAC,CAAC;YAC1B,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;YACxC,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;QACD,KAAK,sBAAsB,CAAC,CAAC,CAAC;YAC5B,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;YACxC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC","sourcesContent":["import type { createAgent } from \"@nexface/agent\";\nimport { createModelConfig as completions, type ModelConfigOptions as CompletionsOptions } from \"@nexface/agent/openai-completions\";\nimport { createModelConfig as responses, type ModelConfigOptions as ResponsesOptions } from \"@nexface/agent/openai-responses\";\nimport { createModelConfig as anthropic, type ModelConfigOptions as AnthropicOptions } from \"@nexface/agent/anthropic-messages\";\nimport { createModelConfig as google, type ModelConfigOptions as GoogleOptions } from \"@nexface/agent/google-generative-ai\";\n\nexport type NexfaceModelConfig =\n | (CompletionsOptions & { protocol?: \"openai-completions\" })\n | (ResponsesOptions & { protocol: \"openai-responses\" })\n | (AnthropicOptions & { protocol: \"anthropic-messages\" })\n | (GoogleOptions & { protocol: \"google-generative-ai\" });\n\nexport type NexfaceAgentConfig = Pick<\n Parameters<typeof createAgent>[0],\n \"tools\" | \"toolRegistry\" | \"skills\" | \"maxSteps\" | \"maxRetries\" | \"applicationContext\"\n> & {\n model: NexfaceModelConfig;\n /**\n * @experimental Page decisions may change in future releases.\n * @beta\n */\n pageDecision?: NonNullable<Parameters<typeof createAgent>[0][\"pageDecision\"]>;\n};\n\nexport function resolveModelConfig(config: NexfaceModelConfig) {\n switch (config.protocol) {\n case undefined:\n case \"openai-completions\": {\n const { protocol, ...options } = config;\n return completions(options);\n }\n case \"openai-responses\": {\n const { protocol, ...options } = config;\n return responses(options);\n }\n case \"anthropic-messages\": {\n const { protocol, ...options } = config;\n return anthropic(options);\n }\n case \"google-generative-ai\": {\n const { protocol, ...options } = config;\n return google(options);\n }\n default:\n throw new Error(\"Unsupported Nexface model protocol.\");\n }\n}\n"]}