@celljs/ai-openai 3.4.4
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/LICENSE +21 -0
- package/README.md +96 -0
- package/lib/common/api/api-protocol.d.ts +47 -0
- package/lib/common/api/api-protocol.d.ts.map +1 -0
- package/lib/common/api/api-protocol.js +6 -0
- package/lib/common/api/api-protocol.js.map +1 -0
- package/lib/common/api/chat-request.d.ts +198 -0
- package/lib/common/api/chat-request.d.ts.map +1 -0
- package/lib/common/api/chat-request.js +145 -0
- package/lib/common/api/chat-request.js.map +1 -0
- package/lib/common/api/chat-response.d.ts +193 -0
- package/lib/common/api/chat-response.d.ts.map +1 -0
- package/lib/common/api/chat-response.js +124 -0
- package/lib/common/api/chat-response.js.map +1 -0
- package/lib/common/api/embeddings-request.d.ts +59 -0
- package/lib/common/api/embeddings-request.d.ts.map +1 -0
- package/lib/common/api/embeddings-request.js +49 -0
- package/lib/common/api/embeddings-request.js.map +1 -0
- package/lib/common/api/embeddings-response.d.ts +27 -0
- package/lib/common/api/embeddings-response.d.ts.map +1 -0
- package/lib/common/api/embeddings-response.js +30 -0
- package/lib/common/api/embeddings-response.js.map +1 -0
- package/lib/common/api/index.d.ts +10 -0
- package/lib/common/api/index.d.ts.map +1 -0
- package/lib/common/api/index.js +13 -0
- package/lib/common/api/index.js.map +1 -0
- package/lib/common/api/message.d.ts +216 -0
- package/lib/common/api/message.d.ts.map +1 -0
- package/lib/common/api/message.js +179 -0
- package/lib/common/api/message.js.map +1 -0
- package/lib/common/api/openai-api.d.ts +18 -0
- package/lib/common/api/openai-api.d.ts.map +1 -0
- package/lib/common/api/openai-api.js +99 -0
- package/lib/common/api/openai-api.js.map +1 -0
- package/lib/common/api/openai-api.spec.d.ts +2 -0
- package/lib/common/api/openai-api.spec.d.ts.map +1 -0
- package/lib/common/api/openai-api.spec.js +162 -0
- package/lib/common/api/openai-api.spec.js.map +1 -0
- package/lib/common/api/openai-model.d.ts +117 -0
- package/lib/common/api/openai-model.d.ts.map +1 -0
- package/lib/common/api/openai-model.js +121 -0
- package/lib/common/api/openai-model.js.map +1 -0
- package/lib/common/api/response-format.d.ts +60 -0
- package/lib/common/api/response-format.d.ts.map +1 -0
- package/lib/common/api/response-format.js +79 -0
- package/lib/common/api/response-format.js.map +1 -0
- package/lib/common/api/usage.d.ts +79 -0
- package/lib/common/api/usage.d.ts.map +1 -0
- package/lib/common/api/usage.js +95 -0
- package/lib/common/api/usage.js.map +1 -0
- package/lib/common/index.d.ts +4 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +7 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/model/index.d.ts +5 -0
- package/lib/common/model/index.d.ts.map +1 -0
- package/lib/common/model/index.js +8 -0
- package/lib/common/model/index.js.map +1 -0
- package/lib/common/model/openai-chat-model.d.ts +37 -0
- package/lib/common/model/openai-chat-model.d.ts.map +1 -0
- package/lib/common/model/openai-chat-model.js +357 -0
- package/lib/common/model/openai-chat-model.js.map +1 -0
- package/lib/common/model/openai-chat-model.spec.d.ts +2 -0
- package/lib/common/model/openai-chat-model.spec.d.ts.map +1 -0
- package/lib/common/model/openai-chat-model.spec.js +82 -0
- package/lib/common/model/openai-chat-model.spec.js.map +1 -0
- package/lib/common/model/openai-chat-options.d.ts +159 -0
- package/lib/common/model/openai-chat-options.d.ts.map +1 -0
- package/lib/common/model/openai-chat-options.js +231 -0
- package/lib/common/model/openai-chat-options.js.map +1 -0
- package/lib/common/model/openai-embedding-model.d.ts +15 -0
- package/lib/common/model/openai-embedding-model.d.ts.map +1 -0
- package/lib/common/model/openai-embedding-model.js +64 -0
- package/lib/common/model/openai-embedding-model.js.map +1 -0
- package/lib/common/model/openai-embedding-model.spec.d.ts +2 -0
- package/lib/common/model/openai-embedding-model.spec.d.ts.map +1 -0
- package/lib/common/model/openai-embedding-model.spec.js +100 -0
- package/lib/common/model/openai-embedding-model.spec.js.map +1 -0
- package/lib/common/model/openai-embedding-options.d.ts +35 -0
- package/lib/common/model/openai-embedding-options.d.ts.map +1 -0
- package/lib/common/model/openai-embedding-options.js +56 -0
- package/lib/common/model/openai-embedding-options.js.map +1 -0
- package/lib/common/module.d.ts +4 -0
- package/lib/common/module.d.ts.map +1 -0
- package/lib/common/module.js +6 -0
- package/lib/common/module.js.map +1 -0
- package/lib/common/support/index.d.ts +3 -0
- package/lib/common/support/index.d.ts.map +1 -0
- package/lib/common/support/index.js +6 -0
- package/lib/common/support/index.js.map +1 -0
- package/lib/common/support/openai-api-response-headers.d.ts +34 -0
- package/lib/common/support/openai-api-response-headers.d.ts.map +1 -0
- package/lib/common/support/openai-api-response-headers.js +45 -0
- package/lib/common/support/openai-api-response-headers.js.map +1 -0
- package/lib/common/support/openai-response-header-extractor.d.ts +12 -0
- package/lib/common/support/openai-response-header-extractor.d.ts.map +1 -0
- package/lib/common/support/openai-response-header-extractor.js +131 -0
- package/lib/common/support/openai-response-header-extractor.js.map +1 -0
- package/lib/common/test/mock-openai-api.d.ts +13 -0
- package/lib/common/test/mock-openai-api.d.ts.map +1 -0
- package/lib/common/test/mock-openai-api.js +57 -0
- package/lib/common/test/mock-openai-api.js.map +1 -0
- package/lib/common/test/test-container.d.ts +3 -0
- package/lib/common/test/test-container.d.ts.map +1 -0
- package/lib/common/test/test-container.js +16 -0
- package/lib/common/test/test-container.js.map +1 -0
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.d.ts.map +1 -0
- package/lib/package.spec.js +4 -0
- package/lib/package.spec.js.map +1 -0
- package/package.json +46 -0
- package/src/common/api/api-protocol.ts +51 -0
- package/src/common/api/chat-request.ts +258 -0
- package/src/common/api/chat-response.ts +218 -0
- package/src/common/api/embeddings-request.ts +92 -0
- package/src/common/api/embeddings-response.ts +44 -0
- package/src/common/api/index.ts +9 -0
- package/src/common/api/message.ts +273 -0
- package/src/common/api/openai-api.spec.ts +175 -0
- package/src/common/api/openai-api.ts +111 -0
- package/src/common/api/openai-model.ts +137 -0
- package/src/common/api/response-format.ts +109 -0
- package/src/common/api/usage.ts +135 -0
- package/src/common/index.ts +3 -0
- package/src/common/model/index.ts +4 -0
- package/src/common/model/openai-chat-model.spec.ts +85 -0
- package/src/common/model/openai-chat-model.ts +399 -0
- package/src/common/model/openai-chat-options.ts +326 -0
- package/src/common/model/openai-embedding-model.spec.ts +112 -0
- package/src/common/model/openai-embedding-model.ts +83 -0
- package/src/common/model/openai-embedding-options.ts +72 -0
- package/src/common/module.ts +4 -0
- package/src/common/support/index.ts +2 -0
- package/src/common/support/openai-api-response-headers.ts +46 -0
- package/src/common/support/openai-response-header-extractor.ts +141 -0
- package/src/common/test/mock-openai-api.ts +70 -0
- package/src/common/test/test-container.ts +13 -0
- package/src/package.spec.ts +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Cellbang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Cell - AI OpenAI Component
|
|
2
|
+
|
|
3
|
+
## 概览
|
|
4
|
+
|
|
5
|
+
AI OpenAI 模块是一个用于与 OpenAI API 交互的库,提供了生成聊天响应和嵌入向量的功能。通过简单易用的 API 接口,支持消息的创建、请求的发送和响应的处理。是 @celljs/ai-core 模块中所有模型服务接口抽象的一种实现。
|
|
6
|
+
|
|
7
|
+
## 特性
|
|
8
|
+
|
|
9
|
+
- 生成聊天响应
|
|
10
|
+
- 生成嵌入向量
|
|
11
|
+
- 支持流式响应
|
|
12
|
+
- 支持多种模型参数配置
|
|
13
|
+
|
|
14
|
+
## 安装
|
|
15
|
+
|
|
16
|
+
使用 npm 安装 AI OpenAI 模块:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @celljs/ai-openai
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
或者使用 yarn:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
yarn add @celljs/ai-openai
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 快速开始
|
|
29
|
+
|
|
30
|
+
以下是一个简单的示例,展示如何使用 AI OpenAI 模块生成聊天响应和嵌入向量:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { AssistantMessage, PromptTemplate } from '@celljs/ai-core';
|
|
34
|
+
import { OpenAIChatModel, OpenAIModel, } from '@celljs/ai-openai';
|
|
35
|
+
import { Component Autowired } from '@celljs/core';
|
|
36
|
+
|
|
37
|
+
@Component()
|
|
38
|
+
export class OpenAIDemo {
|
|
39
|
+
@Autowired(OpenAIChatModel)
|
|
40
|
+
private openAIChatModel: OpenAIChatModel;
|
|
41
|
+
|
|
42
|
+
@Autowired(OpenAIEmbeddingModel)
|
|
43
|
+
private openAIEmbeddingModel: OpenAIEmbeddingModel;
|
|
44
|
+
|
|
45
|
+
@Autowired(PromptTemplate)
|
|
46
|
+
private promptTemplate: PromptTemplate;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Chat with OpenAI
|
|
50
|
+
*/
|
|
51
|
+
async chat() {
|
|
52
|
+
const prompt = await this.promptTemplate.create(
|
|
53
|
+
'Hello {name}',
|
|
54
|
+
{
|
|
55
|
+
chatOptions: { model: OpenAIModel.LLAMA3_2 },
|
|
56
|
+
variables: { name: 'OpenAI' }
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
const response = await this.openAIChatModel.call(prompt);
|
|
60
|
+
console.log(response.result.output);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Stream chat response
|
|
65
|
+
*/
|
|
66
|
+
async stream() {
|
|
67
|
+
const prompt = await this.promptTemplate.create(
|
|
68
|
+
'Hello {name}',
|
|
69
|
+
{
|
|
70
|
+
chatOptions: { model: OpenAIModel.LLAMA3_2 },
|
|
71
|
+
variables: { name: 'OpenAI' }
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
const response$ = await this.openAIChatModel.stream(prompt);
|
|
75
|
+
response$.subscribe({
|
|
76
|
+
next: response => console.log(response.result.output),
|
|
77
|
+
complete: () => console.log('Chat completed!')
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Embed text to vector
|
|
83
|
+
*/
|
|
84
|
+
async embed() {
|
|
85
|
+
const response = await this.openAIEmbeddingModel.call({
|
|
86
|
+
inputs: ['text to embed'],
|
|
87
|
+
options: { model: OpenAIModel.LLAMA3_2 }
|
|
88
|
+
});
|
|
89
|
+
console.log(response.result.embeddings);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## 许可证
|
|
95
|
+
|
|
96
|
+
本项目采用 MIT 许可证。
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ChatCompletionRequest } from './chat-request';
|
|
3
|
+
import { ChatCompletion, ChatCompletionChunk } from './chat-response';
|
|
4
|
+
import { EmbeddingResponse } from './embeddings-response';
|
|
5
|
+
import { EmbeddingRequest } from './embeddings-request';
|
|
6
|
+
import { ResponseEntity } from '@celljs/http';
|
|
7
|
+
export declare const OpenAIAPIOptions: unique symbol;
|
|
8
|
+
export declare const OpenAIAPI: unique symbol;
|
|
9
|
+
export interface OpenAIAPIOptions {
|
|
10
|
+
baseUrl?: string;
|
|
11
|
+
apiKey: string;
|
|
12
|
+
completionsPath?: string;
|
|
13
|
+
embeddingsPath?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Interface representing the OpenAI API.
|
|
17
|
+
*/
|
|
18
|
+
export interface OpenAIAPI {
|
|
19
|
+
/**
|
|
20
|
+
* Creates a model response for the given chat conversation.
|
|
21
|
+
* @param chatRequest - The chat completion request.
|
|
22
|
+
* @param additionalHttpHeader - Optional, additional HTTP headers to be added to the request.
|
|
23
|
+
* @returns A promise that resolves to the chat completion response.
|
|
24
|
+
*/
|
|
25
|
+
chat(chatRequest: ChatCompletionRequest, additionalHttpHeader?: Record<string, string>): Promise<ResponseEntity<ChatCompletion>>;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a streaming chat response for the given chat conversation.
|
|
28
|
+
* @param chatRequest - The chat completion request. Must have the stream property set to true.
|
|
29
|
+
* @param additionalHttpHeader - Optional, additional HTTP headers to be added to the request.
|
|
30
|
+
* @returns A promise that resolves to an observable of chat completion chunks.
|
|
31
|
+
*/
|
|
32
|
+
streamingChat(chatRequest: ChatCompletionRequest, additionalHttpHeader?: Record<string, string>): Promise<Observable<ResponseEntity<ChatCompletionChunk>>>;
|
|
33
|
+
/**
|
|
34
|
+
* Creates an embedding vector representing the input text or token array.
|
|
35
|
+
* @param embeddingsRequest - The embedding request.
|
|
36
|
+
* @typeParam T - Type of the entity in the data list. Can be a string or list of tokens (e.g., integers).
|
|
37
|
+
* For embedding multiple inputs in a single request, you can pass a list of strings or a list of lists of tokens.
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* embed(List.of("text1", "text2", "text3"));
|
|
41
|
+
* embed(List.of(List.of(1, 2, 3), List.of(3, 4, 5)));
|
|
42
|
+
* ```
|
|
43
|
+
* @returns A promise that resolves to an embedding response containing a list of embeddings.
|
|
44
|
+
*/
|
|
45
|
+
embed<T>(embeddingsRequest: EmbeddingRequest<T>): Promise<ResponseEntity<EmbeddingResponse>>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=api-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-protocol.d.ts","sourceRoot":"","sources":["../../../src/common/api/api-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAC3D,eAAO,MAAM,SAAS,eAAsB,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB;;;;;OAKG;IACH,IAAI,CAAC,WAAW,EAAE,qBAAqB,EAAE,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;IAEjI;;;;;OAKG;IACH,aAAa,CAAC,WAAW,EAAE,qBAAqB,EAAE,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAE3J;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,CAAC,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC,CAAC;CAChG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenAIAPI = exports.OpenAIAPIOptions = void 0;
|
|
4
|
+
exports.OpenAIAPIOptions = Symbol('OpenAIAPIOptions');
|
|
5
|
+
exports.OpenAIAPI = Symbol('OpenAIAPI');
|
|
6
|
+
//# sourceMappingURL=api-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-protocol.js","sourceRoot":"","sources":["../../../src/common/api/api-protocol.ts"],"names":[],"mappings":";;;AAOa,QAAA,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAC9C,QAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { ChatCompletionMessage } from './message';
|
|
2
|
+
import { ResponseFormat } from './response-format';
|
|
3
|
+
export declare class StreamOptions {
|
|
4
|
+
/**
|
|
5
|
+
* includeUsage If set, an additional chunk will be streamed
|
|
6
|
+
* before the data: [DONE] message. The usage field on this chunk
|
|
7
|
+
* shows the token usage statistics for the entire request, and
|
|
8
|
+
* the choices field will always be an empty array. All other chunks
|
|
9
|
+
* will also include a usage field, but with a null value.
|
|
10
|
+
*/
|
|
11
|
+
includeUsage: boolean;
|
|
12
|
+
static INCLUDE_USAGE: StreamOptions;
|
|
13
|
+
constructor(
|
|
14
|
+
/**
|
|
15
|
+
* includeUsage If set, an additional chunk will be streamed
|
|
16
|
+
* before the data: [DONE] message. The usage field on this chunk
|
|
17
|
+
* shows the token usage statistics for the entire request, and
|
|
18
|
+
* the choices field will always be an empty array. All other chunks
|
|
19
|
+
* will also include a usage field, but with a null value.
|
|
20
|
+
*/
|
|
21
|
+
includeUsage: boolean);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Function definition.
|
|
25
|
+
*/
|
|
26
|
+
export declare class Function {
|
|
27
|
+
description: string;
|
|
28
|
+
name: string;
|
|
29
|
+
parameters: Record<string, any>;
|
|
30
|
+
strict?: boolean;
|
|
31
|
+
static create(description: string, name: string, parameters: Record<string, any>, strict?: boolean): Function;
|
|
32
|
+
}
|
|
33
|
+
export declare enum ToolType {
|
|
34
|
+
/**
|
|
35
|
+
* Function tool type.
|
|
36
|
+
*/
|
|
37
|
+
FUNCTION = "function"
|
|
38
|
+
}
|
|
39
|
+
export declare class FunctionTool {
|
|
40
|
+
/**
|
|
41
|
+
* The type of the tool. Currently, only 'function' is supported.
|
|
42
|
+
*/
|
|
43
|
+
type: ToolType;
|
|
44
|
+
/**
|
|
45
|
+
* The function definition.
|
|
46
|
+
*/
|
|
47
|
+
function: Function;
|
|
48
|
+
static create(func: Function): FunctionTool;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The type of modality for the model completion.
|
|
52
|
+
*/
|
|
53
|
+
export declare enum OutputModality {
|
|
54
|
+
AUDIO = "audio",
|
|
55
|
+
TEXT = "text"
|
|
56
|
+
}
|
|
57
|
+
export declare enum Voice {
|
|
58
|
+
ALLOY = "alloy",
|
|
59
|
+
ECHO = "echo",
|
|
60
|
+
FABLE = "fable",
|
|
61
|
+
ONYX = "onyx",
|
|
62
|
+
NOVA = "nova",
|
|
63
|
+
SHIMMER = "shimmer"
|
|
64
|
+
}
|
|
65
|
+
export declare enum AudioResponseFormat {
|
|
66
|
+
MP3 = "mp3",
|
|
67
|
+
FLAC = "flac",
|
|
68
|
+
OPUS = "opus",
|
|
69
|
+
PCM16 = "pcm16",
|
|
70
|
+
WAV = "wav"
|
|
71
|
+
}
|
|
72
|
+
export declare class AudioParameters {
|
|
73
|
+
/**
|
|
74
|
+
* Specifies the voice type.
|
|
75
|
+
*/
|
|
76
|
+
voice?: Voice;
|
|
77
|
+
/**
|
|
78
|
+
* Specifies the output audio format.
|
|
79
|
+
*/
|
|
80
|
+
format?: AudioResponseFormat;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Creates a model response for the given chat conversation.
|
|
84
|
+
*/
|
|
85
|
+
export declare class ChatCompletionRequest {
|
|
86
|
+
/**
|
|
87
|
+
* A list of messages comprising the conversation so far.
|
|
88
|
+
*/
|
|
89
|
+
messages: ChatCompletionMessage[];
|
|
90
|
+
/**
|
|
91
|
+
* ID of the model to use.
|
|
92
|
+
*/
|
|
93
|
+
model: string;
|
|
94
|
+
/**
|
|
95
|
+
* Whether to store the output of this chat completion request for use in OpenAI's model distillation or evals products.
|
|
96
|
+
*/
|
|
97
|
+
store?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Developer-defined tags and values used for filtering completions in the OpenAI's dashboard.
|
|
100
|
+
*/
|
|
101
|
+
metadata?: Record<string, any>;
|
|
102
|
+
/**
|
|
103
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far,
|
|
104
|
+
* decreasing the model's likelihood to repeat the same line verbatim.
|
|
105
|
+
*/
|
|
106
|
+
frequencyPenalty?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Modify the likelihood of specified tokens appearing in the completion.
|
|
109
|
+
* Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100.
|
|
110
|
+
*/
|
|
111
|
+
logitBias?: Record<string, number>;
|
|
112
|
+
/**
|
|
113
|
+
* Whether to return log probabilities of the output tokens or not.
|
|
114
|
+
*/
|
|
115
|
+
logprobs?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* An integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with an associated log probability.
|
|
118
|
+
*/
|
|
119
|
+
topLogprobs?: number;
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
|
|
122
|
+
*/
|
|
123
|
+
maxTokens?: number;
|
|
124
|
+
/**
|
|
125
|
+
* An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.
|
|
126
|
+
*/
|
|
127
|
+
maxCompletionTokens?: number;
|
|
128
|
+
/**
|
|
129
|
+
* How many chat completion choices to generate for each input message.
|
|
130
|
+
*/
|
|
131
|
+
n?: number;
|
|
132
|
+
/**
|
|
133
|
+
* Output types that you would like the model to generate for this request.
|
|
134
|
+
*/
|
|
135
|
+
outputModalities?: OutputModality[];
|
|
136
|
+
/**
|
|
137
|
+
* Parameters for audio output. Required when audio output is requested with outputModalities: ["audio"].
|
|
138
|
+
*/
|
|
139
|
+
audioParameters?: AudioParameters;
|
|
140
|
+
/**
|
|
141
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far,
|
|
142
|
+
* increasing the model's likelihood to talk about new topics.
|
|
143
|
+
*/
|
|
144
|
+
presencePenalty?: number;
|
|
145
|
+
/**
|
|
146
|
+
* An object specifying the format that the model must output.
|
|
147
|
+
*/
|
|
148
|
+
responseFormat?: ResponseFormat;
|
|
149
|
+
/**
|
|
150
|
+
* If specified, our system will make a best effort to sample deterministically,
|
|
151
|
+
* such that repeated requests with the same seed and parameters should return the same result.
|
|
152
|
+
*/
|
|
153
|
+
seed?: number;
|
|
154
|
+
/**
|
|
155
|
+
* Specifies the latency tier to use for processing the request.
|
|
156
|
+
*/
|
|
157
|
+
serviceTier?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Up to 4 sequences where the API will stop generating further tokens.
|
|
160
|
+
*/
|
|
161
|
+
stop?: string[];
|
|
162
|
+
/**
|
|
163
|
+
* Options for streaming response.
|
|
164
|
+
*/
|
|
165
|
+
stream?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* The format to return the response in. Currently, the only accepted value is "json".
|
|
168
|
+
*/
|
|
169
|
+
streamOptions?: StreamOptions;
|
|
170
|
+
/**
|
|
171
|
+
* What sampling temperature to use, between 0 and 1. Higher values like 0.8 will make the output more random,
|
|
172
|
+
* while lower values like 0.2 will make it more focused and deterministic.
|
|
173
|
+
*/
|
|
174
|
+
temperature?: number;
|
|
175
|
+
/**
|
|
176
|
+
* An alternative to sampling with temperature, called nucleus sampling,
|
|
177
|
+
* where the model considers the results of the tokens with top_p probability mass.
|
|
178
|
+
*/
|
|
179
|
+
topP?: number;
|
|
180
|
+
/**
|
|
181
|
+
* A list of tools the model may call. Currently, only functions are supported as a tool.
|
|
182
|
+
*/
|
|
183
|
+
tools?: FunctionTool[];
|
|
184
|
+
/**
|
|
185
|
+
* Controls which (if any) function is called by the model.
|
|
186
|
+
*/
|
|
187
|
+
toolChoice?: Record<string, any>;
|
|
188
|
+
/**
|
|
189
|
+
* If set to true, the model will call all functions in the tools list in parallel. Otherwise,
|
|
190
|
+
* the model will call the functions in the tools list in the order they are provided.
|
|
191
|
+
*/
|
|
192
|
+
parallelToolCalls?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
|
|
195
|
+
*/
|
|
196
|
+
user?: string;
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=chat-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-request.d.ts","sourceRoot":"","sources":["../../../src/common/api/chat-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MA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EH,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IAEvB;;OAEG;IAEH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEjC;;;OAGG;IAEH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatCompletionRequest = exports.AudioParameters = exports.AudioResponseFormat = exports.Voice = exports.OutputModality = exports.FunctionTool = exports.ToolType = exports.Function = exports.StreamOptions = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const class_transformer_1 = require("class-transformer");
|
|
6
|
+
const response_format_1 = require("./response-format");
|
|
7
|
+
class StreamOptions {
|
|
8
|
+
constructor(
|
|
9
|
+
/**
|
|
10
|
+
* includeUsage If set, an additional chunk will be streamed
|
|
11
|
+
* before the data: [DONE] message. The usage field on this chunk
|
|
12
|
+
* shows the token usage statistics for the entire request, and
|
|
13
|
+
* the choices field will always be an empty array. All other chunks
|
|
14
|
+
* will also include a usage field, but with a null value.
|
|
15
|
+
*/
|
|
16
|
+
includeUsage) {
|
|
17
|
+
this.includeUsage = includeUsage;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.StreamOptions = StreamOptions;
|
|
21
|
+
StreamOptions.INCLUDE_USAGE = new StreamOptions(true);
|
|
22
|
+
/**
|
|
23
|
+
* Function definition.
|
|
24
|
+
*/
|
|
25
|
+
class Function {
|
|
26
|
+
static create(description, name, parameters, strict) {
|
|
27
|
+
const func = new Function();
|
|
28
|
+
func.description = description;
|
|
29
|
+
func.name = name;
|
|
30
|
+
func.parameters = parameters;
|
|
31
|
+
func.strict = strict;
|
|
32
|
+
return func;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.Function = Function;
|
|
36
|
+
var ToolType;
|
|
37
|
+
(function (ToolType) {
|
|
38
|
+
/**
|
|
39
|
+
* Function tool type.
|
|
40
|
+
*/
|
|
41
|
+
ToolType["FUNCTION"] = "function";
|
|
42
|
+
})(ToolType = exports.ToolType || (exports.ToolType = {}));
|
|
43
|
+
class FunctionTool {
|
|
44
|
+
static create(func) {
|
|
45
|
+
const tool = new FunctionTool();
|
|
46
|
+
tool.type = ToolType.FUNCTION;
|
|
47
|
+
tool.function = func;
|
|
48
|
+
return tool;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.FunctionTool = FunctionTool;
|
|
52
|
+
/**
|
|
53
|
+
* The type of modality for the model completion.
|
|
54
|
+
*/
|
|
55
|
+
var OutputModality;
|
|
56
|
+
(function (OutputModality) {
|
|
57
|
+
OutputModality["AUDIO"] = "audio";
|
|
58
|
+
OutputModality["TEXT"] = "text";
|
|
59
|
+
})(OutputModality = exports.OutputModality || (exports.OutputModality = {}));
|
|
60
|
+
var Voice;
|
|
61
|
+
(function (Voice) {
|
|
62
|
+
Voice["ALLOY"] = "alloy";
|
|
63
|
+
Voice["ECHO"] = "echo";
|
|
64
|
+
Voice["FABLE"] = "fable";
|
|
65
|
+
Voice["ONYX"] = "onyx";
|
|
66
|
+
Voice["NOVA"] = "nova";
|
|
67
|
+
Voice["SHIMMER"] = "shimmer";
|
|
68
|
+
})(Voice = exports.Voice || (exports.Voice = {}));
|
|
69
|
+
var AudioResponseFormat;
|
|
70
|
+
(function (AudioResponseFormat) {
|
|
71
|
+
AudioResponseFormat["MP3"] = "mp3";
|
|
72
|
+
AudioResponseFormat["FLAC"] = "flac";
|
|
73
|
+
AudioResponseFormat["OPUS"] = "opus";
|
|
74
|
+
AudioResponseFormat["PCM16"] = "pcm16";
|
|
75
|
+
AudioResponseFormat["WAV"] = "wav";
|
|
76
|
+
})(AudioResponseFormat = exports.AudioResponseFormat || (exports.AudioResponseFormat = {}));
|
|
77
|
+
class AudioParameters {
|
|
78
|
+
}
|
|
79
|
+
exports.AudioParameters = AudioParameters;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a model response for the given chat conversation.
|
|
82
|
+
*/
|
|
83
|
+
class ChatCompletionRequest {
|
|
84
|
+
}
|
|
85
|
+
tslib_1.__decorate([
|
|
86
|
+
(0, class_transformer_1.Expose)({ name: 'frequency_penalty' }),
|
|
87
|
+
tslib_1.__metadata("design:type", Number)
|
|
88
|
+
], ChatCompletionRequest.prototype, "frequencyPenalty", void 0);
|
|
89
|
+
tslib_1.__decorate([
|
|
90
|
+
(0, class_transformer_1.Expose)({ name: 'logit_bias' }),
|
|
91
|
+
tslib_1.__metadata("design:type", Object)
|
|
92
|
+
], ChatCompletionRequest.prototype, "logitBias", void 0);
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
(0, class_transformer_1.Expose)({ name: 'top_logprobs' }),
|
|
95
|
+
tslib_1.__metadata("design:type", Number)
|
|
96
|
+
], ChatCompletionRequest.prototype, "topLogprobs", void 0);
|
|
97
|
+
tslib_1.__decorate([
|
|
98
|
+
(0, class_transformer_1.Expose)({ name: 'max_completion_tokens' }),
|
|
99
|
+
tslib_1.__metadata("design:type", Number)
|
|
100
|
+
], ChatCompletionRequest.prototype, "maxCompletionTokens", void 0);
|
|
101
|
+
tslib_1.__decorate([
|
|
102
|
+
(0, class_transformer_1.Expose)({ name: 'output_modalities' }),
|
|
103
|
+
tslib_1.__metadata("design:type", Array)
|
|
104
|
+
], ChatCompletionRequest.prototype, "outputModalities", void 0);
|
|
105
|
+
tslib_1.__decorate([
|
|
106
|
+
(0, class_transformer_1.Expose)({ name: 'audio_parameters' }),
|
|
107
|
+
(0, class_transformer_1.Type)(() => AudioParameters),
|
|
108
|
+
tslib_1.__metadata("design:type", AudioParameters)
|
|
109
|
+
], ChatCompletionRequest.prototype, "audioParameters", void 0);
|
|
110
|
+
tslib_1.__decorate([
|
|
111
|
+
(0, class_transformer_1.Expose)({ name: 'presence_penalty' }),
|
|
112
|
+
tslib_1.__metadata("design:type", Number)
|
|
113
|
+
], ChatCompletionRequest.prototype, "presencePenalty", void 0);
|
|
114
|
+
tslib_1.__decorate([
|
|
115
|
+
(0, class_transformer_1.Expose)({ name: 'response_format' }),
|
|
116
|
+
(0, class_transformer_1.Type)(() => response_format_1.ResponseFormat),
|
|
117
|
+
tslib_1.__metadata("design:type", response_format_1.ResponseFormat)
|
|
118
|
+
], ChatCompletionRequest.prototype, "responseFormat", void 0);
|
|
119
|
+
tslib_1.__decorate([
|
|
120
|
+
(0, class_transformer_1.Expose)({ name: 'service_tier' }),
|
|
121
|
+
tslib_1.__metadata("design:type", String)
|
|
122
|
+
], ChatCompletionRequest.prototype, "serviceTier", void 0);
|
|
123
|
+
tslib_1.__decorate([
|
|
124
|
+
(0, class_transformer_1.Expose)({ name: 'stream_options' }),
|
|
125
|
+
(0, class_transformer_1.Type)(() => StreamOptions),
|
|
126
|
+
tslib_1.__metadata("design:type", StreamOptions)
|
|
127
|
+
], ChatCompletionRequest.prototype, "streamOptions", void 0);
|
|
128
|
+
tslib_1.__decorate([
|
|
129
|
+
(0, class_transformer_1.Expose)({ name: 'top_p' }),
|
|
130
|
+
tslib_1.__metadata("design:type", Number)
|
|
131
|
+
], ChatCompletionRequest.prototype, "topP", void 0);
|
|
132
|
+
tslib_1.__decorate([
|
|
133
|
+
(0, class_transformer_1.Type)(() => FunctionTool),
|
|
134
|
+
tslib_1.__metadata("design:type", Array)
|
|
135
|
+
], ChatCompletionRequest.prototype, "tools", void 0);
|
|
136
|
+
tslib_1.__decorate([
|
|
137
|
+
(0, class_transformer_1.Expose)({ name: 'tool_choice' }),
|
|
138
|
+
tslib_1.__metadata("design:type", Object)
|
|
139
|
+
], ChatCompletionRequest.prototype, "toolChoice", void 0);
|
|
140
|
+
tslib_1.__decorate([
|
|
141
|
+
(0, class_transformer_1.Expose)({ name: 'parallel_tool_calls' }),
|
|
142
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
143
|
+
], ChatCompletionRequest.prototype, "parallelToolCalls", void 0);
|
|
144
|
+
exports.ChatCompletionRequest = ChatCompletionRequest;
|
|
145
|
+
//# sourceMappingURL=chat-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-request.js","sourceRoot":"","sources":["../../../src/common/api/chat-request.ts"],"names":[],"mappings":";;;;AAAA,yDAAiD;AAEjD,uDAAmD;AAEnD,MAAa,aAAa;IAGtB;IACI;;;;;;OAMG;IACI,YAAqB;QAArB,iBAAY,GAAZ,YAAY,CAAS;IAEhC,CAAC;;AAbL,sCAcC;AAbU,2BAAa,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;AAenD;;GAEG;AACH,MAAa,QAAQ;IAMjB,MAAM,CAAC,MAAM,CAAC,WAAmB,EAAE,IAAY,EAAE,UAA+B,EAAE,MAAgB;QAC9F,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAdD,4BAcC;AAED,IAAY,QAKX;AALD,WAAY,QAAQ;IAChB;;OAEG;IACH,iCAAqB,CAAA;AACzB,CAAC,EALW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKnB;AAED,MAAa,YAAY;IAWrB,MAAM,CAAC,MAAM,CAAC,IAAc;QACxB,MAAM,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAjBD,oCAiBC;AAED;;GAEG;AACH,IAAY,cAGX;AAHD,WAAY,cAAc;I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