@xsai/shared-chat 0.4.0 → 0.4.1

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 +6 -0
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -56,6 +56,8 @@ interface ToolCallFunctionWithoutName {
56
56
  interface AssistantMessage {
57
57
  content?: (RefusalContentPart | TextContentPart)[] | string;
58
58
  name?: string;
59
+ /** @see {@link https://cookbook.openai.com/articles/gpt-oss/handle-raw-cot#chat-completions-api} */
60
+ reasoning?: string;
59
61
  /** @remarks OpenAI doesn't support this, but some providers do. */
60
62
  reasoning_content?: string;
61
63
  refusal?: string;
@@ -161,6 +163,8 @@ interface ChatOptions extends CommonRequestOptions {
161
163
  * @default 0
162
164
  */
163
165
  presencePenalty?: number;
166
+ /** Constrains effort on reasoning for reasoning models. */
167
+ reasoningEffort?: 'high' | 'medium' | 'minimal' | 'none' | 'xhigh';
164
168
  seed?: number;
165
169
  /** up to 4 sequences where the API will stop generating further tokens. */
166
170
  stop?: [string, string, string, string] | [string, string, string] | [string, string] | [string] | string;
@@ -169,7 +173,9 @@ interface ChatOptions extends CommonRequestOptions {
169
173
  * @default 1
170
174
  */
171
175
  temperature?: number;
176
+ /** Controls which (if any) tool is called by the model. */
172
177
  toolChoice?: ToolChoice;
178
+ /** A list of tools the model may call. */
173
179
  tools?: Tool[];
174
180
  /** @remarks OpenAI doesn't support this, but some providers do. */
175
181
  topK?: number;
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",
4
+ "version": "0.4.1",
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"
32
+ "@xsai/shared": "~0.4.1"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "pkgroll"