@dxpos/knowledge 0.3.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/README.md +76 -0
- package/dist/generated/client/client.gen.d.ts +3 -0
- package/dist/generated/client/client.gen.d.ts.map +1 -0
- package/dist/generated/client/client.gen.js +216 -0
- package/dist/generated/client/index.d.ts +11 -0
- package/dist/generated/client/index.d.ts.map +1 -0
- package/dist/generated/client/index.js +6 -0
- package/dist/generated/client/types.gen.d.ts +121 -0
- package/dist/generated/client/types.gen.d.ts.map +1 -0
- package/dist/generated/client/types.gen.js +2 -0
- package/dist/generated/client/utils.gen.d.ts +38 -0
- package/dist/generated/client/utils.gen.d.ts.map +1 -0
- package/dist/generated/client/utils.gen.js +228 -0
- package/dist/generated/client.gen.d.ts +13 -0
- package/dist/generated/client.gen.d.ts.map +1 -0
- package/dist/generated/client.gen.js +3 -0
- package/dist/generated/core/auth.gen.d.ts +26 -0
- package/dist/generated/core/auth.gen.d.ts.map +1 -0
- package/dist/generated/core/auth.gen.js +14 -0
- package/dist/generated/core/bodySerializer.gen.d.ts +26 -0
- package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/bodySerializer.gen.js +57 -0
- package/dist/generated/core/params.gen.d.ts +44 -0
- package/dist/generated/core/params.gen.d.ts.map +1 -0
- package/dist/generated/core/params.gen.js +109 -0
- package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
- package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/pathSerializer.gen.js +106 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/queryKeySerializer.gen.js +92 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.js +132 -0
- package/dist/generated/core/types.gen.d.ts +84 -0
- package/dist/generated/core/types.gen.d.ts.map +1 -0
- package/dist/generated/core/types.gen.js +2 -0
- package/dist/generated/core/utils.gen.d.ts +20 -0
- package/dist/generated/core/utils.gen.d.ts.map +1 -0
- package/dist/generated/core/utils.gen.js +87 -0
- package/dist/generated/index.d.ts +3 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +2 -0
- package/dist/generated/sdk.gen.d.ts +100 -0
- package/dist/generated/sdk.gen.d.ts.map +1 -0
- package/dist/generated/sdk.gen.js +252 -0
- package/dist/generated/types.gen.d.ts +927 -0
- package/dist/generated/types.gen.d.ts.map +1 -0
- package/dist/generated/types.gen.js +2 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/package.json +27 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { type Client, type ClientMeta, type Options as Options2, type RequestResult, type TDataShape } from './client';
|
|
2
|
+
import type { DeleteApiChatConversationsByIdData, DeleteApiChatConversationsByIdErrors, DeleteApiChatConversationsByIdResponses, DeleteApiFilesByIdData, DeleteApiFilesByIdErrors, DeleteApiFilesByIdResponses, GetApiChatConversationsByIdData, GetApiChatConversationsByIdErrors, GetApiChatConversationsByIdResponses, GetApiChatConversationsData, GetApiChatConversationsErrors, GetApiChatConversationsResponses, GetApiChatSettingsData, GetApiChatSettingsErrors, GetApiChatSettingsResponses, GetApiFilesByIdData, GetApiFilesByIdErrors, GetApiFilesByIdRawData, GetApiFilesByIdRawErrors, GetApiFilesByIdRawResponses, GetApiFilesByIdResponses, GetApiFilesByIdUrlData, GetApiFilesByIdUrlErrors, GetApiFilesByIdUrlResponses, GetApiFilesData, GetApiFilesErrors, GetApiFilesResponses, GetApiSearchData, GetApiSearchErrors, GetApiSearchResponses, PatchApiChatConversationsByIdData, PatchApiChatConversationsByIdErrors, PatchApiChatConversationsByIdResponses, PostApiChatConversationsData, PostApiChatConversationsErrors, PostApiChatConversationsResponses, PostApiChatData, PostApiChatErrors, PostApiChatResponses, PostApiFilesCompleteData, PostApiFilesCompleteErrors, PostApiFilesCompleteResponses, PostApiFilesData, PostApiFilesErrors, PostApiFilesPresignData, PostApiFilesPresignErrors, PostApiFilesPresignResponses, PostApiFilesResponses, PutApiChatSettingsData, PutApiChatSettingsErrors, PutApiChatSettingsResponses } from './types.gen';
|
|
3
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
|
+
/**
|
|
5
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
6
|
+
* individual options. This might be also useful if you want to implement a
|
|
7
|
+
* custom client.
|
|
8
|
+
*/
|
|
9
|
+
client?: Client;
|
|
10
|
+
/**
|
|
11
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
12
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
13
|
+
*/
|
|
14
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* 列出文件
|
|
18
|
+
*/
|
|
19
|
+
export declare const getApiFiles: <ThrowOnError extends boolean = false>(options?: Options<GetApiFilesData, ThrowOnError>) => RequestResult<GetApiFilesResponses, GetApiFilesErrors, ThrowOnError>;
|
|
20
|
+
/**
|
|
21
|
+
* 服务端直传文件
|
|
22
|
+
*
|
|
23
|
+
* 需编辑者及以上。
|
|
24
|
+
*/
|
|
25
|
+
export declare const postApiFiles: <ThrowOnError extends boolean = false>(options: Options<PostApiFilesData, ThrowOnError>) => RequestResult<PostApiFilesResponses, PostApiFilesErrors, ThrowOnError>;
|
|
26
|
+
/**
|
|
27
|
+
* 预签名直传
|
|
28
|
+
*
|
|
29
|
+
* 需编辑者及以上。返回对象存储 PUT 地址。
|
|
30
|
+
*/
|
|
31
|
+
export declare const postApiFilesPresign: <ThrowOnError extends boolean = false>(options: Options<PostApiFilesPresignData, ThrowOnError>) => RequestResult<PostApiFilesPresignResponses, PostApiFilesPresignErrors, ThrowOnError>;
|
|
32
|
+
/**
|
|
33
|
+
* 确认预签名上传完成
|
|
34
|
+
*
|
|
35
|
+
* 需编辑者及以上。
|
|
36
|
+
*/
|
|
37
|
+
export declare const postApiFilesComplete: <ThrowOnError extends boolean = false>(options: Options<PostApiFilesCompleteData, ThrowOnError>) => RequestResult<PostApiFilesCompleteResponses, PostApiFilesCompleteErrors, ThrowOnError>;
|
|
38
|
+
/**
|
|
39
|
+
* 删除文件
|
|
40
|
+
*
|
|
41
|
+
* 需编辑者及以上。
|
|
42
|
+
*/
|
|
43
|
+
export declare const deleteApiFilesById: <ThrowOnError extends boolean = false>(options: Options<DeleteApiFilesByIdData, ThrowOnError>) => RequestResult<DeleteApiFilesByIdResponses, DeleteApiFilesByIdErrors, ThrowOnError>;
|
|
44
|
+
/**
|
|
45
|
+
* 获取文件元数据
|
|
46
|
+
*/
|
|
47
|
+
export declare const getApiFilesById: <ThrowOnError extends boolean = false>(options: Options<GetApiFilesByIdData, ThrowOnError>) => RequestResult<GetApiFilesByIdResponses, GetApiFilesByIdErrors, ThrowOnError>;
|
|
48
|
+
/**
|
|
49
|
+
* 读取文件原始内容
|
|
50
|
+
*/
|
|
51
|
+
export declare const getApiFilesByIdRaw: <ThrowOnError extends boolean = false>(options: Options<GetApiFilesByIdRawData, ThrowOnError>) => RequestResult<GetApiFilesByIdRawResponses, GetApiFilesByIdRawErrors, ThrowOnError>;
|
|
52
|
+
/**
|
|
53
|
+
* 获取文件下载地址
|
|
54
|
+
*/
|
|
55
|
+
export declare const getApiFilesByIdUrl: <ThrowOnError extends boolean = false>(options: Options<GetApiFilesByIdUrlData, ThrowOnError>) => RequestResult<GetApiFilesByIdUrlResponses, GetApiFilesByIdUrlErrors, ThrowOnError>;
|
|
56
|
+
/**
|
|
57
|
+
* RAG 问答
|
|
58
|
+
*
|
|
59
|
+
* stream 默认 true,返回 NDJSON 事件流:token / node / references / done / error。stream=false 时返回 JSON 信封,data 为完整回答与引用。
|
|
60
|
+
*/
|
|
61
|
+
export declare const postApiChat: <ThrowOnError extends boolean = false>(options: Options<PostApiChatData, ThrowOnError>) => RequestResult<PostApiChatResponses, PostApiChatErrors, ThrowOnError>;
|
|
62
|
+
/**
|
|
63
|
+
* 读取对话模块设置
|
|
64
|
+
*
|
|
65
|
+
* 需编辑者及以上。空字段表示继承全局设置。
|
|
66
|
+
*/
|
|
67
|
+
export declare const getApiChatSettings: <ThrowOnError extends boolean = false>(options?: Options<GetApiChatSettingsData, ThrowOnError>) => RequestResult<GetApiChatSettingsResponses, GetApiChatSettingsErrors, ThrowOnError>;
|
|
68
|
+
/**
|
|
69
|
+
* 更新对话模块设置
|
|
70
|
+
*
|
|
71
|
+
* 需编辑者及以上。空字段表示继承全局设置。
|
|
72
|
+
*/
|
|
73
|
+
export declare const putApiChatSettings: <ThrowOnError extends boolean = false>(options: Options<PutApiChatSettingsData, ThrowOnError>) => RequestResult<PutApiChatSettingsResponses, PutApiChatSettingsErrors, ThrowOnError>;
|
|
74
|
+
/**
|
|
75
|
+
* 列出会话
|
|
76
|
+
*/
|
|
77
|
+
export declare const getApiChatConversations: <ThrowOnError extends boolean = false>(options?: Options<GetApiChatConversationsData, ThrowOnError>) => RequestResult<GetApiChatConversationsResponses, GetApiChatConversationsErrors, ThrowOnError>;
|
|
78
|
+
/**
|
|
79
|
+
* 创建会话
|
|
80
|
+
*/
|
|
81
|
+
export declare const postApiChatConversations: <ThrowOnError extends boolean = false>(options?: Options<PostApiChatConversationsData, ThrowOnError>) => RequestResult<PostApiChatConversationsResponses, PostApiChatConversationsErrors, ThrowOnError>;
|
|
82
|
+
/**
|
|
83
|
+
* 删除会话
|
|
84
|
+
*/
|
|
85
|
+
export declare const deleteApiChatConversationsById: <ThrowOnError extends boolean = false>(options: Options<DeleteApiChatConversationsByIdData, ThrowOnError>) => RequestResult<DeleteApiChatConversationsByIdResponses, DeleteApiChatConversationsByIdErrors, ThrowOnError>;
|
|
86
|
+
/**
|
|
87
|
+
* 获取会话与消息
|
|
88
|
+
*/
|
|
89
|
+
export declare const getApiChatConversationsById: <ThrowOnError extends boolean = false>(options: Options<GetApiChatConversationsByIdData, ThrowOnError>) => RequestResult<GetApiChatConversationsByIdResponses, GetApiChatConversationsByIdErrors, ThrowOnError>;
|
|
90
|
+
/**
|
|
91
|
+
* 更新会话
|
|
92
|
+
*
|
|
93
|
+
* 需编辑者及以上。
|
|
94
|
+
*/
|
|
95
|
+
export declare const patchApiChatConversationsById: <ThrowOnError extends boolean = false>(options: Options<PatchApiChatConversationsByIdData, ThrowOnError>) => RequestResult<PatchApiChatConversationsByIdResponses, PatchApiChatConversationsByIdErrors, ThrowOnError>;
|
|
96
|
+
/**
|
|
97
|
+
* 关键词检索文档
|
|
98
|
+
*/
|
|
99
|
+
export declare const getApiSearch: <ThrowOnError extends boolean = false>(options: Options<GetApiSearchData, ThrowOnError>) => RequestResult<GetApiSearchResponses, GetApiSearchErrors, ThrowOnError>;
|
|
100
|
+
//# sourceMappingURL=sdk.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.gen.d.ts","sourceRoot":"","sources":["../../src/generated/sdk.gen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAA0B,KAAK,OAAO,IAAI,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAE/I,OAAO,KAAK,EAAE,kCAAkC,EAAE,oCAAoC,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,iCAAiC,EAAE,oCAAoC,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,gCAAgC,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,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GAIG;AACH,eAAO,MAAM,6BAA6B,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,SAAS,OAAO,CAAC,iCAAiC,EAAE,YAAY,CAAC,KAAG,aAAa,CAAC,sCAAsC,EAAE,mCAAmC,EAAE,YAAY,CAY7P,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,SAAS,OAAO,CAAC,gBAAgB,EAAE,YAAY,CAAC,KAAG,aAAa,CAAC,qBAAqB,EAAE,kBAAkB,EAAE,YAAY,CAQzL,CAAC"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { formDataBodySerializer } from './client';
|
|
3
|
+
import { client } from './client.gen';
|
|
4
|
+
/**
|
|
5
|
+
* 列出文件
|
|
6
|
+
*/
|
|
7
|
+
export const getApiFiles = (options) => (options?.client ?? client).get({
|
|
8
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
9
|
+
in: 'cookie',
|
|
10
|
+
name: 'authjs.session-token',
|
|
11
|
+
type: 'apiKey'
|
|
12
|
+
}],
|
|
13
|
+
url: '/api/files',
|
|
14
|
+
...options
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* 服务端直传文件
|
|
18
|
+
*
|
|
19
|
+
* 需编辑者及以上。
|
|
20
|
+
*/
|
|
21
|
+
export const postApiFiles = (options) => (options.client ?? client).post({
|
|
22
|
+
...formDataBodySerializer,
|
|
23
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
24
|
+
in: 'cookie',
|
|
25
|
+
name: 'authjs.session-token',
|
|
26
|
+
type: 'apiKey'
|
|
27
|
+
}],
|
|
28
|
+
url: '/api/files',
|
|
29
|
+
...options,
|
|
30
|
+
headers: {
|
|
31
|
+
'Content-Type': null,
|
|
32
|
+
...options.headers
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* 预签名直传
|
|
37
|
+
*
|
|
38
|
+
* 需编辑者及以上。返回对象存储 PUT 地址。
|
|
39
|
+
*/
|
|
40
|
+
export const postApiFilesPresign = (options) => (options.client ?? client).post({
|
|
41
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
42
|
+
in: 'cookie',
|
|
43
|
+
name: 'authjs.session-token',
|
|
44
|
+
type: 'apiKey'
|
|
45
|
+
}],
|
|
46
|
+
url: '/api/files/presign',
|
|
47
|
+
...options,
|
|
48
|
+
headers: {
|
|
49
|
+
'Content-Type': 'application/json',
|
|
50
|
+
...options.headers
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* 确认预签名上传完成
|
|
55
|
+
*
|
|
56
|
+
* 需编辑者及以上。
|
|
57
|
+
*/
|
|
58
|
+
export const postApiFilesComplete = (options) => (options.client ?? client).post({
|
|
59
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
60
|
+
in: 'cookie',
|
|
61
|
+
name: 'authjs.session-token',
|
|
62
|
+
type: 'apiKey'
|
|
63
|
+
}],
|
|
64
|
+
url: '/api/files/complete',
|
|
65
|
+
...options,
|
|
66
|
+
headers: {
|
|
67
|
+
'Content-Type': 'application/json',
|
|
68
|
+
...options.headers
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* 删除文件
|
|
73
|
+
*
|
|
74
|
+
* 需编辑者及以上。
|
|
75
|
+
*/
|
|
76
|
+
export const deleteApiFilesById = (options) => (options.client ?? client).delete({
|
|
77
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
78
|
+
in: 'cookie',
|
|
79
|
+
name: 'authjs.session-token',
|
|
80
|
+
type: 'apiKey'
|
|
81
|
+
}],
|
|
82
|
+
url: '/api/files/{id}',
|
|
83
|
+
...options
|
|
84
|
+
});
|
|
85
|
+
/**
|
|
86
|
+
* 获取文件元数据
|
|
87
|
+
*/
|
|
88
|
+
export const getApiFilesById = (options) => (options.client ?? client).get({
|
|
89
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
90
|
+
in: 'cookie',
|
|
91
|
+
name: 'authjs.session-token',
|
|
92
|
+
type: 'apiKey'
|
|
93
|
+
}],
|
|
94
|
+
url: '/api/files/{id}',
|
|
95
|
+
...options
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* 读取文件原始内容
|
|
99
|
+
*/
|
|
100
|
+
export const getApiFilesByIdRaw = (options) => (options.client ?? client).get({
|
|
101
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
102
|
+
in: 'cookie',
|
|
103
|
+
name: 'authjs.session-token',
|
|
104
|
+
type: 'apiKey'
|
|
105
|
+
}],
|
|
106
|
+
url: '/api/files/{id}/raw',
|
|
107
|
+
...options
|
|
108
|
+
});
|
|
109
|
+
/**
|
|
110
|
+
* 获取文件下载地址
|
|
111
|
+
*/
|
|
112
|
+
export const getApiFilesByIdUrl = (options) => (options.client ?? client).get({
|
|
113
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
114
|
+
in: 'cookie',
|
|
115
|
+
name: 'authjs.session-token',
|
|
116
|
+
type: 'apiKey'
|
|
117
|
+
}],
|
|
118
|
+
url: '/api/files/{id}/url',
|
|
119
|
+
...options
|
|
120
|
+
});
|
|
121
|
+
/**
|
|
122
|
+
* RAG 问答
|
|
123
|
+
*
|
|
124
|
+
* stream 默认 true,返回 NDJSON 事件流:token / node / references / done / error。stream=false 时返回 JSON 信封,data 为完整回答与引用。
|
|
125
|
+
*/
|
|
126
|
+
export const postApiChat = (options) => (options.client ?? client).post({
|
|
127
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
128
|
+
in: 'cookie',
|
|
129
|
+
name: 'authjs.session-token',
|
|
130
|
+
type: 'apiKey'
|
|
131
|
+
}],
|
|
132
|
+
url: '/api/chat',
|
|
133
|
+
...options,
|
|
134
|
+
headers: {
|
|
135
|
+
'Content-Type': 'application/json',
|
|
136
|
+
...options.headers
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
/**
|
|
140
|
+
* 读取对话模块设置
|
|
141
|
+
*
|
|
142
|
+
* 需编辑者及以上。空字段表示继承全局设置。
|
|
143
|
+
*/
|
|
144
|
+
export const getApiChatSettings = (options) => (options?.client ?? client).get({
|
|
145
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
146
|
+
in: 'cookie',
|
|
147
|
+
name: 'authjs.session-token',
|
|
148
|
+
type: 'apiKey'
|
|
149
|
+
}],
|
|
150
|
+
url: '/api/chat/settings',
|
|
151
|
+
...options
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* 更新对话模块设置
|
|
155
|
+
*
|
|
156
|
+
* 需编辑者及以上。空字段表示继承全局设置。
|
|
157
|
+
*/
|
|
158
|
+
export const putApiChatSettings = (options) => (options.client ?? client).put({
|
|
159
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
160
|
+
in: 'cookie',
|
|
161
|
+
name: 'authjs.session-token',
|
|
162
|
+
type: 'apiKey'
|
|
163
|
+
}],
|
|
164
|
+
url: '/api/chat/settings',
|
|
165
|
+
...options,
|
|
166
|
+
headers: {
|
|
167
|
+
'Content-Type': 'application/json',
|
|
168
|
+
...options.headers
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
/**
|
|
172
|
+
* 列出会话
|
|
173
|
+
*/
|
|
174
|
+
export const getApiChatConversations = (options) => (options?.client ?? client).get({
|
|
175
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
176
|
+
in: 'cookie',
|
|
177
|
+
name: 'authjs.session-token',
|
|
178
|
+
type: 'apiKey'
|
|
179
|
+
}],
|
|
180
|
+
url: '/api/chat/conversations',
|
|
181
|
+
...options
|
|
182
|
+
});
|
|
183
|
+
/**
|
|
184
|
+
* 创建会话
|
|
185
|
+
*/
|
|
186
|
+
export const postApiChatConversations = (options) => (options?.client ?? client).post({
|
|
187
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
188
|
+
in: 'cookie',
|
|
189
|
+
name: 'authjs.session-token',
|
|
190
|
+
type: 'apiKey'
|
|
191
|
+
}],
|
|
192
|
+
url: '/api/chat/conversations',
|
|
193
|
+
...options,
|
|
194
|
+
headers: {
|
|
195
|
+
'Content-Type': 'application/json',
|
|
196
|
+
...options?.headers
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
/**
|
|
200
|
+
* 删除会话
|
|
201
|
+
*/
|
|
202
|
+
export const deleteApiChatConversationsById = (options) => (options.client ?? client).delete({
|
|
203
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
204
|
+
in: 'cookie',
|
|
205
|
+
name: 'authjs.session-token',
|
|
206
|
+
type: 'apiKey'
|
|
207
|
+
}],
|
|
208
|
+
url: '/api/chat/conversations/{id}',
|
|
209
|
+
...options
|
|
210
|
+
});
|
|
211
|
+
/**
|
|
212
|
+
* 获取会话与消息
|
|
213
|
+
*/
|
|
214
|
+
export const getApiChatConversationsById = (options) => (options.client ?? client).get({
|
|
215
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
216
|
+
in: 'cookie',
|
|
217
|
+
name: 'authjs.session-token',
|
|
218
|
+
type: 'apiKey'
|
|
219
|
+
}],
|
|
220
|
+
url: '/api/chat/conversations/{id}',
|
|
221
|
+
...options
|
|
222
|
+
});
|
|
223
|
+
/**
|
|
224
|
+
* 更新会话
|
|
225
|
+
*
|
|
226
|
+
* 需编辑者及以上。
|
|
227
|
+
*/
|
|
228
|
+
export const patchApiChatConversationsById = (options) => (options.client ?? client).patch({
|
|
229
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
230
|
+
in: 'cookie',
|
|
231
|
+
name: 'authjs.session-token',
|
|
232
|
+
type: 'apiKey'
|
|
233
|
+
}],
|
|
234
|
+
url: '/api/chat/conversations/{id}',
|
|
235
|
+
...options,
|
|
236
|
+
headers: {
|
|
237
|
+
'Content-Type': 'application/json',
|
|
238
|
+
...options.headers
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
/**
|
|
242
|
+
* 关键词检索文档
|
|
243
|
+
*/
|
|
244
|
+
export const getApiSearch = (options) => (options.client ?? client).get({
|
|
245
|
+
security: [{ scheme: 'bearer', type: 'http' }, {
|
|
246
|
+
in: 'cookie',
|
|
247
|
+
name: 'authjs.session-token',
|
|
248
|
+
type: 'apiKey'
|
|
249
|
+
}],
|
|
250
|
+
url: '/api/search',
|
|
251
|
+
...options
|
|
252
|
+
});
|