@xsai/shared-chat 0.4.0-beta.8 → 0.4.0-beta.9

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 (2) hide show
  1. package/dist/index.d.ts +13 -4
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -36,13 +36,22 @@ interface TextContentPart {
36
36
  }
37
37
 
38
38
  interface ToolCall {
39
- function: {
40
- arguments: string;
41
- name: string;
42
- };
39
+ function: ToolCallFunction | ToolCallFunctionWithoutArguments | ToolCallFunctionWithoutName;
43
40
  id: string;
44
41
  type: 'function';
45
42
  }
43
+ interface ToolCallFunction {
44
+ arguments: string;
45
+ name: string;
46
+ }
47
+ interface ToolCallFunctionWithoutArguments {
48
+ arguments?: never;
49
+ name: string;
50
+ }
51
+ interface ToolCallFunctionWithoutName {
52
+ arguments: string;
53
+ name?: never;
54
+ }
46
55
 
47
56
  interface AssistantMessage {
48
57
  content?: (RefusalContentPart | TextContentPart)[] | string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xsai/shared-chat",
3
3
  "type": "module",
4
- "version": "0.4.0-beta.8",
4
+ "version": "0.4.0-beta.9",
5
5
  "description": "extra-small AI SDK.",
6
6
  "author": "Moeru AI",
7
7
  "license": "MIT",
@@ -29,7 +29,7 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@xsai/shared": "~0.4.0-beta.8"
32
+ "@xsai/shared": "~0.4.0-beta.9"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "pkgroll"