@kevisual/ai 0.0.7 → 0.0.8

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.
@@ -5,7 +5,13 @@ import * as _kevisual_permission from '@kevisual/permission';
5
5
  import { Permission } from '@kevisual/permission';
6
6
 
7
7
  type ChatMessage = OpenAI.Chat.Completions.ChatCompletionMessageParam;
8
- type ChatMessageOptions = Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>;
8
+ type ChatMessageOptions = Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams> & {
9
+ /**
10
+ * 是否能够思考
11
+ * 如果会话是千文,服务器的接口,默认为 true
12
+ */
13
+ enable_thinking?: boolean;
14
+ };
9
15
  type ChatMessageComplete = OpenAI.Chat.Completions.ChatCompletion;
10
16
  type ChatMessageStream = OpenAI.Chat.Completions.ChatCompletion;
11
17
  type EmbeddingMessage = Partial<OpenAI.Embeddings.EmbeddingCreateParams>;
@@ -5,7 +5,13 @@ import * as _kevisual_permission from '@kevisual/permission';
5
5
  import { Permission } from '@kevisual/permission';
6
6
 
7
7
  type ChatMessage = OpenAI.Chat.Completions.ChatCompletionMessageParam;
8
- type ChatMessageOptions = Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>;
8
+ type ChatMessageOptions = Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams> & {
9
+ /**
10
+ * 是否能够思考
11
+ * 如果会话是千文,服务器的接口,默认为 true
12
+ */
13
+ enable_thinking?: boolean;
14
+ };
9
15
  type ChatMessageComplete = OpenAI.Chat.Completions.ChatCompletion;
10
16
  type ChatMessageStream = OpenAI.Chat.Completions.ChatCompletion;
11
17
  type EmbeddingMessage = Partial<OpenAI.Embeddings.EmbeddingCreateParams>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevisual/ai",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "后面需要把ai-center的provider模块提取出去",
5
5
  "main": "index.js",
6
6
  "basename": "/root/ai-center-services",
@@ -1,7 +1,13 @@
1
1
  import OpenAI from 'openai';
2
2
 
3
3
  export type ChatMessage = OpenAI.Chat.Completions.ChatCompletionMessageParam;
4
- export type ChatMessageOptions = Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams>;
4
+ export type ChatMessageOptions = Partial<OpenAI.Chat.Completions.ChatCompletionCreateParams> & {
5
+ /**
6
+ * 是否能够思考
7
+ * 如果会话是千文,服务器的接口,默认为 true
8
+ */
9
+ enable_thinking?: boolean;
10
+ };
5
11
  export type ChatMessageComplete = OpenAI.Chat.Completions.ChatCompletion;
6
12
  export type ChatMessageStream = OpenAI.Chat.Completions.ChatCompletion;
7
13