@compassdigital/sdk.typescript 4.403.0 → 4.404.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/lib/index.d.ts +1 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -9
- package/lib/index.js.map +1 -1
- package/lib/interface/ai.d.ts +0 -29
- package/lib/interface/ai.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -15
- package/src/interface/ai.ts +0 -56
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1308,8 +1308,6 @@ import {
|
|
|
1308
1308
|
PostAiImageGenerateResponse,
|
|
1309
1309
|
PostAiTranslateBody,
|
|
1310
1310
|
PostAiTranslateResponse,
|
|
1311
|
-
PostOpenaiChatBody,
|
|
1312
|
-
PostOpenaiChatResponse,
|
|
1313
1311
|
} from './interface/ai';
|
|
1314
1312
|
|
|
1315
1313
|
import {
|
|
@@ -14298,19 +14296,6 @@ export class ServiceClient extends BaseServiceClient {
|
|
|
14298
14296
|
return this.request('ai', '/ai/translate', 'POST', `/ai/translate`, body, options);
|
|
14299
14297
|
}
|
|
14300
14298
|
|
|
14301
|
-
/**
|
|
14302
|
-
* POST /ai/openai/chat - Chat with OpenAI
|
|
14303
|
-
*
|
|
14304
|
-
* @param body
|
|
14305
|
-
* @param options - additional request options
|
|
14306
|
-
*/
|
|
14307
|
-
post_openai_chat(
|
|
14308
|
-
body: PostOpenaiChatBody,
|
|
14309
|
-
options?: RequestOptions,
|
|
14310
|
-
): ResponsePromise<PostOpenaiChatResponse> {
|
|
14311
|
-
return this.request('ai', '/ai/openai/chat', 'POST', `/ai/openai/chat`, body, options);
|
|
14312
|
-
}
|
|
14313
|
-
|
|
14314
14299
|
/**
|
|
14315
14300
|
* POST /centricos/ai/item/description - Generate item description
|
|
14316
14301
|
*
|
package/src/interface/ai.ts
CHANGED
|
@@ -78,56 +78,6 @@ export interface TranslateResponse {
|
|
|
78
78
|
translations: Record<string, string>;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
export interface OpenAiChatMessage {
|
|
82
|
-
// The role of the message
|
|
83
|
-
role: 'developer' | 'system' | 'user' | 'assistant' | 'tool' | 'function';
|
|
84
|
-
// The content of the message
|
|
85
|
-
content: string;
|
|
86
|
-
// The name of the message
|
|
87
|
-
name: string;
|
|
88
|
-
// The tool calls of the message
|
|
89
|
-
toolCalls: string[];
|
|
90
|
-
// The tool call ID (for tool role messages)
|
|
91
|
-
toolCallId: string;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface OpenAiChatBody {
|
|
95
|
-
// The model to use for the chat completion
|
|
96
|
-
model: string;
|
|
97
|
-
// The messages to send to the chat completion
|
|
98
|
-
messages: OpenAiChatMessage[];
|
|
99
|
-
// The tools to use for the chat completion
|
|
100
|
-
tools: string[];
|
|
101
|
-
// The tool choices to use for the chat completion
|
|
102
|
-
tool_choice: Record<string, any>;
|
|
103
|
-
// The temperature to use for the chat completion
|
|
104
|
-
temperature: number;
|
|
105
|
-
// The max tokens to use for the chat completion
|
|
106
|
-
max_tokens: number;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface OpenAiChatChoice {
|
|
110
|
-
// The index of the choice
|
|
111
|
-
index: number;
|
|
112
|
-
// The message of the choice
|
|
113
|
-
message: OpenAiChatMessage;
|
|
114
|
-
// The finish reason of the choice
|
|
115
|
-
finishReason: string;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface OpenAiChatResponse {
|
|
119
|
-
// The id of the chat completion
|
|
120
|
-
id: string;
|
|
121
|
-
// The object of the chat completion
|
|
122
|
-
object: string;
|
|
123
|
-
// The created at of the chat completion
|
|
124
|
-
created: number;
|
|
125
|
-
// The model of the chat completion
|
|
126
|
-
model: string;
|
|
127
|
-
// The choices of the chat completion
|
|
128
|
-
choices: OpenAiChatChoice[];
|
|
129
|
-
}
|
|
130
|
-
|
|
131
81
|
// POST /ai/language/generate - Generate text from a given prompt
|
|
132
82
|
|
|
133
83
|
export type PostAiLanguageGenerateBody = GenerateTextRequest;
|
|
@@ -145,9 +95,3 @@ export type PostAiImageGenerateResponse = GenerateImageResponse;
|
|
|
145
95
|
export type PostAiTranslateBody = TranslateRequest;
|
|
146
96
|
|
|
147
97
|
export type PostAiTranslateResponse = TranslateResponse;
|
|
148
|
-
|
|
149
|
-
// POST /ai/openai/chat - Chat with OpenAI
|
|
150
|
-
|
|
151
|
-
export type PostOpenaiChatBody = OpenAiChatBody;
|
|
152
|
-
|
|
153
|
-
export type PostOpenaiChatResponse = OpenAiChatResponse;
|