@lobehub/chat 1.81.6 → 1.81.7
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
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.81.7](https://github.com/lobehub/lobe-chat/compare/v1.81.6...v1.81.7)
|
6
|
+
|
7
|
+
<sup>Released on **2025-04-21**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Together.ai fetch model list.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Together.ai fetch model list, closes [#7498](https://github.com/lobehub/lobe-chat/issues/7498) ([bd797b8](https://github.com/lobehub/lobe-chat/commit/bd797b8))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
### [Version 1.81.6](https://github.com/lobehub/lobe-chat/compare/v1.81.5...v1.81.6)
|
6
31
|
|
7
32
|
<sup>Released on **2025-04-21**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.81.
|
3
|
+
"version": "1.81.7",
|
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",
|
@@ -1,9 +1,9 @@
|
|
1
|
+
import type { ChatModelCard } from '@/types/llm';
|
2
|
+
|
1
3
|
import { ModelProvider } from '../types';
|
2
4
|
import { LobeOpenAICompatibleFactory } from '../utils/openaiCompatibleFactory';
|
3
5
|
import { TogetherAIModel } from './type';
|
4
6
|
|
5
|
-
import type { ChatModelCard } from '@/types/llm';
|
6
|
-
|
7
7
|
export const LobeTogetherAI = LobeOpenAICompatibleFactory({
|
8
8
|
baseURL: 'https://api.together.xyz/v1',
|
9
9
|
constructorOptions: {
|
@@ -18,24 +18,20 @@ export const LobeTogetherAI = LobeOpenAICompatibleFactory({
|
|
18
18
|
models: async ({ client }) => {
|
19
19
|
const { LOBE_DEFAULT_MODEL_LIST } = await import('@/config/aiModels');
|
20
20
|
|
21
|
-
const visionKeywords = [
|
22
|
-
'qvq',
|
23
|
-
'vision',
|
24
|
-
];
|
21
|
+
const visionKeywords = ['qvq', 'vision'];
|
25
22
|
|
26
|
-
const reasoningKeywords = [
|
27
|
-
'deepseek-r1',
|
28
|
-
'qwq',
|
29
|
-
];
|
23
|
+
const reasoningKeywords = ['deepseek-r1', 'qwq'];
|
30
24
|
|
31
25
|
client.baseURL = 'https://api.together.xyz/api';
|
32
26
|
|
33
|
-
const modelsPage = await client.models.list() as any;
|
27
|
+
const modelsPage = (await client.models.list()) as any;
|
34
28
|
const modelList: TogetherAIModel[] = modelsPage.body;
|
35
29
|
|
36
30
|
return modelList
|
37
31
|
.map((model) => {
|
38
|
-
const knownModel = LOBE_DEFAULT_MODEL_LIST.find(
|
32
|
+
const knownModel = LOBE_DEFAULT_MODEL_LIST.find(
|
33
|
+
(m) => model.id.toLowerCase() === m.id.toLowerCase(),
|
34
|
+
);
|
39
35
|
|
40
36
|
return {
|
41
37
|
contextWindowTokens: knownModel?.contextWindowTokens ?? undefined,
|
@@ -43,21 +39,21 @@ export const LobeTogetherAI = LobeOpenAICompatibleFactory({
|
|
43
39
|
displayName: model.display_name,
|
44
40
|
enabled: knownModel?.enabled || false,
|
45
41
|
functionCall:
|
46
|
-
model.description?.toLowerCase().includes('function calling')
|
47
|
-
|
48
|
-
|
49
|
-
id: model.
|
42
|
+
model.description?.toLowerCase().includes('function calling') ||
|
43
|
+
knownModel?.abilities?.functionCall ||
|
44
|
+
false,
|
45
|
+
id: model.id,
|
50
46
|
maxOutput: model.context_length,
|
51
47
|
reasoning:
|
52
|
-
reasoningKeywords.some(keyword => model.
|
53
|
-
|
54
|
-
|
48
|
+
reasoningKeywords.some((keyword) => model.id.toLowerCase().includes(keyword)) ||
|
49
|
+
knownModel?.abilities?.functionCall ||
|
50
|
+
false,
|
55
51
|
tokens: model.context_length,
|
56
52
|
vision:
|
57
|
-
model.description?.toLowerCase().includes('vision')
|
58
|
-
|
59
|
-
|
60
|
-
|
53
|
+
model.description?.toLowerCase().includes('vision') ||
|
54
|
+
visionKeywords.some((keyword) => model.id?.toLowerCase().includes(keyword)) ||
|
55
|
+
knownModel?.abilities?.functionCall ||
|
56
|
+
false,
|
61
57
|
};
|
62
58
|
})
|
63
59
|
.filter(Boolean) as ChatModelCard[];
|
@@ -50,7 +50,8 @@ interface Depth {
|
|
50
50
|
}
|
51
51
|
|
52
52
|
export interface TogetherAIModel {
|
53
|
-
|
53
|
+
id: string;
|
54
|
+
// eslint-disable-next-line typescript-sort-keys/interface
|
54
55
|
access: string;
|
55
56
|
config: Config;
|
56
57
|
context_length: number;
|
@@ -67,7 +68,6 @@ export interface TogetherAIModel {
|
|
67
68
|
license: string;
|
68
69
|
link: string;
|
69
70
|
modelInstanceConfig: ModelInstanceConfig;
|
70
|
-
name: string;
|
71
71
|
num_parameters: number;
|
72
72
|
pricing: Pricing;
|
73
73
|
show_in_playground: boolean;
|