@lobehub/chat 1.107.1 → 1.107.3
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/CHANGELOG.md +58 -0
- package/apps/desktop/src/main/core/browser/Browser.ts +17 -4
- package/changelog/v1.json +18 -0
- package/package.json +3 -3
- package/packages/types/package.json +17 -0
- package/src/config/modelProviders/index.ts +3 -3
- package/src/libs/model-runtime/RouterRuntime/createRuntime.ts +1 -0
- package/src/libs/model-runtime/aihubmix/index.ts +3 -5
- package/src/libs/model-runtime/anthropic/index.ts +8 -2
- package/src/libs/model-runtime/google/index.ts +13 -2
- package/tsconfig.json +1 -0
- package/vitest.config.server.ts +6 -3
- package/vitest.config.ts +3 -0
- package/{src/types → packages/types/src}/agent/chatConfig.ts +0 -0
- package/{src/types → packages/types/src}/agent/index.ts +0 -0
- package/{src/types → packages/types/src}/aiModel.ts +0 -0
- package/{src/types → packages/types/src}/aiProvider.ts +0 -0
- package/{src/types → packages/types/src}/apiKey.ts +0 -0
- package/{src/types → packages/types/src}/artifact.ts +0 -0
- package/{src/types → packages/types/src}/asyncTask.ts +0 -0
- package/{src/types → packages/types/src}/changelog.ts +0 -0
- package/{src/types → packages/types/src}/chunk/document.ts +0 -0
- package/{src/types → packages/types/src}/chunk/index.ts +0 -0
- package/{src/types → packages/types/src}/clientDB.ts +0 -0
- package/{src/types → packages/types/src}/discover/assistants.ts +0 -0
- package/{src/types → packages/types/src}/discover/index.ts +0 -0
- package/{src/types → packages/types/src}/discover/mcp.ts +0 -0
- package/{src/types → packages/types/src}/discover/models.ts +0 -0
- package/{src/types → packages/types/src}/discover/plugins.ts +0 -0
- package/{src/types → packages/types/src}/discover/providers.ts +0 -0
- package/{src/types → packages/types/src}/document/index.ts +0 -0
- package/{src/types → packages/types/src}/eval/dataset.ts +0 -0
- package/{src/types → packages/types/src}/eval/evaluation.ts +0 -0
- package/{src/types → packages/types/src}/eval/index.ts +0 -0
- package/{src/types → packages/types/src}/eval/ragas.ts +0 -0
- package/{src/types → packages/types/src}/export.ts +0 -0
- package/{src/types → packages/types/src}/exportConfig.ts +0 -0
- package/{src/types → packages/types/src}/fetch.ts +0 -0
- package/{src/types → packages/types/src}/files/index.ts +0 -0
- package/{src/types → packages/types/src}/files/list.ts +0 -0
- package/{src/types → packages/types/src}/files/upload.ts +0 -0
- package/{src/types → packages/types/src}/generation/index.ts +24 -24
- /package/{src/types → packages/types/src}/hotkey.ts +0 -0
- /package/{src/types → packages/types/src}/importer.ts +0 -0
- /package/{src/types → packages/types/src}/knowledgeBase/index.ts +0 -0
- /package/{src/types → packages/types/src}/llm.ts +0 -0
- /package/{src/types → packages/types/src}/locale.ts +0 -0
- /package/{src/types → packages/types/src}/message/base.ts +0 -0
- /package/{src/types → packages/types/src}/message/chat.ts +0 -0
- /package/{src/types → packages/types/src}/message/image.ts +0 -0
- /package/{src/types → packages/types/src}/message/index.ts +0 -0
- /package/{src/types → packages/types/src}/message/tools.ts +0 -0
- /package/{src/types → packages/types/src}/message/translate.ts +0 -0
- /package/{src/types → packages/types/src}/meta.ts +0 -0
- /package/{src/types → packages/types/src}/next.ts +0 -0
- /package/{src/types → packages/types/src}/openai/chat.ts +0 -0
- /package/{src/types → packages/types/src}/openai/functionCall.ts +0 -0
- /package/{src/types → packages/types/src}/openai/image.ts +0 -0
- /package/{src/types → packages/types/src}/openai/plugin.ts +0 -0
- /package/{src/types → packages/types/src}/plugins/index.ts +0 -0
- /package/{src/types → packages/types/src}/plugins/mcp.ts +0 -0
- /package/{src/types → packages/types/src}/plugins/mcpDeps.ts +0 -0
- /package/{src/types → packages/types/src}/rag.ts +0 -0
- /package/{src/types → packages/types/src}/search.ts +0 -0
- /package/{src/types → packages/types/src}/serverConfig.ts +0 -0
- /package/{src/types → packages/types/src}/service.ts +0 -0
- /package/{src/types → packages/types/src}/session/agentSession.ts +0 -0
- /package/{src/types → packages/types/src}/session/index.ts +0 -0
- /package/{src/types → packages/types/src}/session/sessionGroup.ts +0 -0
- /package/{src/types → packages/types/src}/share.ts +0 -0
- /package/{src/types → packages/types/src}/subscription.ts +0 -0
- /package/{src/types → packages/types/src}/sync.ts +0 -0
- /package/{src/types → packages/types/src}/tableViewer.ts +0 -0
- /package/{src/types → packages/types/src}/tool/builtin.ts +0 -0
- /package/{src/types → packages/types/src}/tool/crawler.ts +0 -0
- /package/{src/types → packages/types/src}/tool/dalle.ts +0 -0
- /package/{src/types → packages/types/src}/tool/index.ts +0 -0
- /package/{src/types → packages/types/src}/tool/plugin.ts +0 -0
- /package/{src/types → packages/types/src}/tool/search/index.ts +0 -0
- /package/{src/types → packages/types/src}/tool/tool.ts +0 -0
- /package/{src/types → packages/types/src}/topic/index.ts +0 -0
- /package/{src/types → packages/types/src}/topic/thread.ts +0 -0
- /package/{src/types → packages/types/src}/topic/topic.ts +0 -0
- /package/{src/types → packages/types/src}/trace/action.ts +0 -0
- /package/{src/types → packages/types/src}/trace/index.ts +0 -0
- /package/{src/types → packages/types/src}/user/index.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/filesConfig.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/general.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/hotkey.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/index.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/keyVaults.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/modelProvider.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/sync.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/systemAgent.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/tool.ts +0 -0
- /package/{src/types → packages/types/src}/user/settings/tts.ts +0 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,64 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.107.3](https://github.com/lobehub/lobe-chat/compare/v1.107.2...v1.107.3)
|
6
|
+
|
7
|
+
<sup>Released on **2025-08-03**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Aihubmix provider request headers.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Aihubmix provider request headers, closes [#8654](https://github.com/lobehub/lobe-chat/issues/8654) ([af07101](https://github.com/lobehub/lobe-chat/commit/af07101))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.107.2](https://github.com/lobehub/lobe-chat/compare/v1.107.1...v1.107.2)
|
31
|
+
|
32
|
+
<sup>Released on **2025-08-02**</sup>
|
33
|
+
|
34
|
+
#### ♻ Code Refactoring
|
35
|
+
|
36
|
+
- **misc**: Move types to separate package.
|
37
|
+
|
38
|
+
#### 🐛 Bug Fixes
|
39
|
+
|
40
|
+
- **desktop**: Settings window can't exit when fullscreen.
|
41
|
+
|
42
|
+
<br/>
|
43
|
+
|
44
|
+
<details>
|
45
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
46
|
+
|
47
|
+
#### Code refactoring
|
48
|
+
|
49
|
+
- **misc**: Move types to separate package, closes [#8635](https://github.com/lobehub/lobe-chat/issues/8635) ([3cc4a54](https://github.com/lobehub/lobe-chat/commit/3cc4a54))
|
50
|
+
|
51
|
+
#### What's fixed
|
52
|
+
|
53
|
+
- **desktop**: Settings window can't exit when fullscreen, closes [#8633](https://github.com/lobehub/lobe-chat/issues/8633) ([954eb2c](https://github.com/lobehub/lobe-chat/commit/954eb2c))
|
54
|
+
|
55
|
+
</details>
|
56
|
+
|
57
|
+
<div align="right">
|
58
|
+
|
59
|
+
[](#readme-top)
|
60
|
+
|
61
|
+
</div>
|
62
|
+
|
5
63
|
### [Version 1.107.1](https://github.com/lobehub/lobe-chat/compare/v1.107.0...v1.107.1)
|
6
64
|
|
7
65
|
<sup>Released on **2025-08-01**</sup>
|
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
import { join } from 'node:path';
|
10
10
|
|
11
11
|
import { buildDir, preloadDir, resourcesDir } from '@/const/dir';
|
12
|
-
import { isDev, isWindows } from '@/const/env';
|
12
|
+
import { isDev, isMac, isWindows } from '@/const/env';
|
13
13
|
import {
|
14
14
|
BACKGROUND_DARK,
|
15
15
|
BACKGROUND_LIGHT,
|
@@ -269,7 +269,20 @@ export default class Browser {
|
|
269
269
|
|
270
270
|
hide() {
|
271
271
|
logger.debug(`Hiding window: ${this.identifier}`);
|
272
|
-
|
272
|
+
|
273
|
+
// Fix for macOS fullscreen black screen issue
|
274
|
+
// See: https://github.com/electron/electron/issues/20263
|
275
|
+
if (isMac && this.browserWindow.isFullScreen()) {
|
276
|
+
logger.debug(
|
277
|
+
`[${this.identifier}] Window is in fullscreen mode, exiting fullscreen before hiding.`,
|
278
|
+
);
|
279
|
+
this.browserWindow.once('leave-full-screen', () => {
|
280
|
+
this.browserWindow.hide();
|
281
|
+
});
|
282
|
+
this.browserWindow.setFullScreen(false);
|
283
|
+
} else {
|
284
|
+
this.browserWindow.hide();
|
285
|
+
}
|
273
286
|
}
|
274
287
|
|
275
288
|
close() {
|
@@ -413,7 +426,7 @@ export default class Browser {
|
|
413
426
|
// logger.error(`[${this.identifier}] Failed to save window state on hide:`, error);
|
414
427
|
// }
|
415
428
|
e.preventDefault();
|
416
|
-
|
429
|
+
this.hide();
|
417
430
|
} else {
|
418
431
|
// Window is actually closing (not keepAlive)
|
419
432
|
logger.debug(
|
@@ -465,7 +478,7 @@ export default class Browser {
|
|
465
478
|
toggleVisible() {
|
466
479
|
logger.debug(`Toggling visibility for window: ${this.identifier}`);
|
467
480
|
if (this._browserWindow.isVisible() && this._browserWindow.isFocused()) {
|
468
|
-
this.
|
481
|
+
this.hide(); // Use the hide() method which handles fullscreen
|
469
482
|
} else {
|
470
483
|
this._browserWindow.show();
|
471
484
|
this._browserWindow.focus();
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"fixes": [
|
5
|
+
"Aihubmix provider request headers."
|
6
|
+
]
|
7
|
+
},
|
8
|
+
"date": "2025-08-03",
|
9
|
+
"version": "1.107.3"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"children": {
|
13
|
+
"improvements": [
|
14
|
+
"Move types to separate package."
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"date": "2025-08-02",
|
18
|
+
"version": "1.107.2"
|
19
|
+
},
|
2
20
|
{
|
3
21
|
"children": {
|
4
22
|
"improvements": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.107.
|
3
|
+
"version": "1.107.3",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -121,7 +121,7 @@
|
|
121
121
|
"dependencies": {
|
122
122
|
"@ant-design/icons": "^5.6.1",
|
123
123
|
"@ant-design/pro-components": "^2.8.10",
|
124
|
-
"@anthropic-ai/sdk": "^0.
|
124
|
+
"@anthropic-ai/sdk": "^0.57.0",
|
125
125
|
"@auth/core": "^0.38.0",
|
126
126
|
"@aws-sdk/client-bedrock-runtime": "^3.848.0",
|
127
127
|
"@aws-sdk/client-s3": "^3.850.0",
|
@@ -204,7 +204,7 @@
|
|
204
204
|
"langfuse": "^3.38.4",
|
205
205
|
"langfuse-core": "^3.38.4",
|
206
206
|
"lodash-es": "^4.17.21",
|
207
|
-
"lucide-react": "^0.
|
207
|
+
"lucide-react": "^0.536.0",
|
208
208
|
"mammoth": "^1.9.1",
|
209
209
|
"markdown-to-txt": "^2.0.1",
|
210
210
|
"mdast-util-to-markdown": "^2.1.2",
|
@@ -124,9 +124,11 @@ export const DEFAULT_MODEL_PROVIDER_LIST = [
|
|
124
124
|
GoogleProvider,
|
125
125
|
VertexAIProvider,
|
126
126
|
DeepSeekProvider,
|
127
|
-
|
127
|
+
MoonshotProvider,
|
128
|
+
AiHubMixProvider,
|
128
129
|
OpenRouterProvider,
|
129
130
|
FalProvider,
|
131
|
+
HuggingFaceProvider,
|
130
132
|
CloudflareProvider,
|
131
133
|
GithubProvider,
|
132
134
|
NovitaProvider,
|
@@ -155,7 +157,6 @@ export const DEFAULT_MODEL_PROVIDER_LIST = [
|
|
155
157
|
SparkProvider,
|
156
158
|
SenseNovaProvider,
|
157
159
|
StepfunProvider,
|
158
|
-
MoonshotProvider,
|
159
160
|
BaichuanProvider,
|
160
161
|
VolcengineProvider,
|
161
162
|
MinimaxProvider,
|
@@ -165,7 +166,6 @@ export const DEFAULT_MODEL_PROVIDER_LIST = [
|
|
165
166
|
GiteeAIProvider,
|
166
167
|
TaichuProvider,
|
167
168
|
Ai360Provider,
|
168
|
-
AiHubMixProvider,
|
169
169
|
Search1APIProvider,
|
170
170
|
InfiniAIProvider,
|
171
171
|
QiniuProvider,
|
@@ -88,6 +88,7 @@ interface CreateRouterRuntimeOptions<T extends Record<string, any> = any> {
|
|
88
88
|
chatCompletion: () => boolean;
|
89
89
|
responses?: () => boolean;
|
90
90
|
};
|
91
|
+
defaultHeaders?: Record<string, any>;
|
91
92
|
errorType?: {
|
92
93
|
bizError: ILobeAgentRuntimeErrorType;
|
93
94
|
invalidAPIKey: ILobeAgentRuntimeErrorType;
|
@@ -17,14 +17,12 @@ export interface AiHubMixModelCard {
|
|
17
17
|
const baseURL = 'https://aihubmix.com';
|
18
18
|
|
19
19
|
export const LobeAiHubMixAI = createRouterRuntime({
|
20
|
-
constructorOptions: {
|
21
|
-
defaultHeaders: {
|
22
|
-
'APP-Code': 'LobeHub',
|
23
|
-
},
|
24
|
-
},
|
25
20
|
debug: {
|
26
21
|
chatCompletion: () => process.env.DEBUG_AIHUBMIX_CHAT_COMPLETION === '1',
|
27
22
|
},
|
23
|
+
defaultHeaders: {
|
24
|
+
'APP-Code': 'LobeHub',
|
25
|
+
},
|
28
26
|
id: ModelProvider.AiHubMix,
|
29
27
|
models: async ({ client }) => {
|
30
28
|
const functionCallKeywords = [
|
@@ -44,7 +44,13 @@ export class LobeAnthropicAI implements LobeRuntimeAI {
|
|
44
44
|
return process.env.DEBUG_ANTHROPIC_CHAT_COMPLETION === '1';
|
45
45
|
}
|
46
46
|
|
47
|
-
constructor({
|
47
|
+
constructor({
|
48
|
+
apiKey,
|
49
|
+
baseURL = DEFAULT_BASE_URL,
|
50
|
+
id,
|
51
|
+
defaultHeaders,
|
52
|
+
...res
|
53
|
+
}: AnthropicAIParams = {}) {
|
48
54
|
if (!apiKey) throw AgentRuntimeError.createError(AgentRuntimeErrorType.InvalidProviderAPIKey);
|
49
55
|
|
50
56
|
const betaHeaders = process.env.ANTHROPIC_BETA_HEADERS;
|
@@ -52,7 +58,7 @@ export class LobeAnthropicAI implements LobeRuntimeAI {
|
|
52
58
|
this.client = new Anthropic({
|
53
59
|
apiKey,
|
54
60
|
baseURL,
|
55
|
-
|
61
|
+
defaultHeaders: { ...defaultHeaders, 'anthropic-beta': betaHeaders },
|
56
62
|
...res,
|
57
63
|
});
|
58
64
|
this.baseURL = this.client.baseURL;
|
@@ -4,6 +4,7 @@ import {
|
|
4
4
|
GenerateContentConfig,
|
5
5
|
Tool as GoogleFunctionCallTool,
|
6
6
|
GoogleGenAI,
|
7
|
+
HttpOptions,
|
7
8
|
Part,
|
8
9
|
Type as SchemaType,
|
9
10
|
ThinkingConfig,
|
@@ -78,6 +79,7 @@ interface LobeGoogleAIParams {
|
|
78
79
|
apiKey?: string;
|
79
80
|
baseURL?: string;
|
80
81
|
client?: GoogleGenAI;
|
82
|
+
defaultHeaders?: Record<string, any>;
|
81
83
|
id?: string;
|
82
84
|
isVertexAi?: boolean;
|
83
85
|
}
|
@@ -100,10 +102,19 @@ export class LobeGoogleAI implements LobeRuntimeAI {
|
|
100
102
|
apiKey?: string;
|
101
103
|
provider: string;
|
102
104
|
|
103
|
-
constructor({
|
105
|
+
constructor({
|
106
|
+
apiKey,
|
107
|
+
baseURL,
|
108
|
+
client,
|
109
|
+
isVertexAi,
|
110
|
+
id,
|
111
|
+
defaultHeaders,
|
112
|
+
}: LobeGoogleAIParams = {}) {
|
104
113
|
if (!apiKey) throw AgentRuntimeError.createError(AgentRuntimeErrorType.InvalidProviderAPIKey);
|
105
114
|
|
106
|
-
const httpOptions = baseURL
|
115
|
+
const httpOptions = baseURL
|
116
|
+
? ({ baseUrl: baseURL, headers: defaultHeaders } as HttpOptions)
|
117
|
+
: undefined;
|
107
118
|
|
108
119
|
this.apiKey = apiKey;
|
109
120
|
this.client = client ? client : new GoogleGenAI({ apiKey, httpOptions });
|
package/tsconfig.json
CHANGED
package/vitest.config.server.ts
CHANGED
@@ -4,7 +4,10 @@ import { coverageConfigDefaults, defineConfig } from 'vitest/config';
|
|
4
4
|
export default defineConfig({
|
5
5
|
test: {
|
6
6
|
alias: {
|
7
|
+
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
8
|
+
'@/types': resolve(__dirname, './packages/types/src'),
|
7
9
|
'@': resolve(__dirname, './src'),
|
10
|
+
/* eslint-enable */
|
8
11
|
},
|
9
12
|
coverage: {
|
10
13
|
all: false,
|
@@ -18,6 +21,9 @@ export default defineConfig({
|
|
18
21
|
reporter: ['text', 'json', 'lcov', 'text-summary'],
|
19
22
|
reportsDirectory: './coverage/server',
|
20
23
|
},
|
24
|
+
env: {
|
25
|
+
TEST_SERVER_DB: '1',
|
26
|
+
},
|
21
27
|
environment: 'node',
|
22
28
|
include: ['src/database/models/**/**/*.test.ts', 'src/database/server/**/**/*.test.ts'],
|
23
29
|
poolOptions: {
|
@@ -26,8 +32,5 @@ export default defineConfig({
|
|
26
32
|
},
|
27
33
|
},
|
28
34
|
setupFiles: './tests/setup-db.ts',
|
29
|
-
env: {
|
30
|
-
TEST_SERVER_DB: '1',
|
31
|
-
},
|
32
35
|
},
|
33
36
|
});
|
package/vitest.config.ts
CHANGED
@@ -8,8 +8,11 @@ export default defineConfig({
|
|
8
8
|
},
|
9
9
|
test: {
|
10
10
|
alias: {
|
11
|
+
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
12
|
+
'@/types': resolve(__dirname, './packages/types/src'),
|
11
13
|
'@': resolve(__dirname, './src'),
|
12
14
|
'~test-utils': resolve(__dirname, './tests/utils.tsx'),
|
15
|
+
/* eslint-enable */
|
13
16
|
},
|
14
17
|
coverage: {
|
15
18
|
all: false,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { AsyncTaskError, AsyncTaskStatus } from '../asyncTask';
|
2
2
|
|
3
3
|
export interface ImageGenerationTopic {
|
4
|
-
id: string;
|
5
|
-
title?: string | null;
|
6
4
|
coverUrl?: string | null;
|
7
5
|
createdAt: Date;
|
6
|
+
id: string;
|
7
|
+
title?: string | null;
|
8
8
|
updatedAt: Date;
|
9
9
|
}
|
10
10
|
|
@@ -14,68 +14,68 @@ export interface BaseGenerationAsset {
|
|
14
14
|
|
15
15
|
export interface ImageGenerationAsset extends BaseGenerationAsset {
|
16
16
|
/**
|
17
|
-
*
|
17
|
+
* 图片/视频的高度
|
18
18
|
*/
|
19
|
-
|
19
|
+
height?: number;
|
20
20
|
/**
|
21
|
-
*
|
21
|
+
* api provider 家的 cdn url,一般很快就会失效
|
22
22
|
*/
|
23
|
-
|
23
|
+
originalUrl?: string;
|
24
24
|
/**
|
25
25
|
* 缩略图,图片那就是尺寸裁剪过的,视频那就是封面的缩略图
|
26
26
|
*/
|
27
27
|
thumbnailUrl?: string;
|
28
28
|
/**
|
29
|
-
*
|
29
|
+
* 存到自己 oss 的 url, 只存了 key, 完整的 url 需要使用 FileService.getFullFileUrl 获取
|
30
30
|
*/
|
31
|
-
|
31
|
+
url?: string;
|
32
32
|
/**
|
33
|
-
*
|
33
|
+
* 图片/视频的宽度
|
34
34
|
*/
|
35
|
-
|
35
|
+
width?: number;
|
36
36
|
}
|
37
37
|
|
38
38
|
export type GenerationAsset = ImageGenerationAsset;
|
39
39
|
|
40
40
|
export interface GenerationConfig {
|
41
|
-
|
41
|
+
aspectRatio?: string;
|
42
|
+
cfg?: number;
|
43
|
+
height?: number;
|
42
44
|
imageUrl?: string | null;
|
43
45
|
imageUrls?: string[];
|
44
|
-
|
45
|
-
height?: number;
|
46
|
-
aspectRatio?: string;
|
46
|
+
prompt: string;
|
47
47
|
size?: string;
|
48
48
|
steps?: number;
|
49
|
-
|
49
|
+
width?: number;
|
50
50
|
}
|
51
51
|
|
52
52
|
export interface GenerationAsyncTask {
|
53
|
+
error?: AsyncTaskError;
|
53
54
|
id: string;
|
54
55
|
status: AsyncTaskStatus;
|
55
|
-
error?: AsyncTaskError;
|
56
56
|
}
|
57
57
|
|
58
58
|
export interface Generation {
|
59
|
-
id: string;
|
60
59
|
/**
|
61
60
|
* The asset associated with the generation, containing image URLs and dimensions.
|
62
61
|
*/
|
63
62
|
asset?: GenerationAsset | null;
|
64
|
-
seed?: number | null;
|
65
|
-
createdAt: Date;
|
66
63
|
asyncTaskId: string | null;
|
64
|
+
createdAt: Date;
|
65
|
+
id: string;
|
66
|
+
seed?: number | null;
|
67
67
|
|
68
68
|
task: GenerationAsyncTask;
|
69
69
|
}
|
70
70
|
|
71
71
|
export interface GenerationBatch {
|
72
|
+
config?: GenerationConfig;
|
73
|
+
createdAt: Date;
|
74
|
+
generations: Generation[];
|
75
|
+
height?: number | null;
|
72
76
|
id: string;
|
73
|
-
provider: string;
|
74
77
|
model: string;
|
75
78
|
prompt: string;
|
79
|
+
provider: string;
|
76
80
|
width?: number | null;
|
77
|
-
height?: number | null;
|
78
|
-
config?: GenerationConfig;
|
79
|
-
createdAt: Date;
|
80
|
-
generations: Generation[];
|
81
81
|
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|