@lobehub/chat 1.40.1 → 1.40.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.
Files changed (118) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/changelog/v1.json +18 -0
  3. package/package.json +1 -1
  4. package/src/app/(main)/changelog/page.tsx +3 -1
  5. package/src/app/(main)/chat/(workspace)/features/ChangelogModal.tsx +11 -0
  6. package/src/app/(main)/chat/(workspace)/page.tsx +8 -5
  7. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Actions.tsx +1 -1
  8. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Header.tsx +1 -1
  9. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/InfoSidebar/SuggestionItem.tsx +2 -2
  10. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ProviderList/ProviderItem.tsx +1 -1
  11. package/src/app/(main)/discover/(detail)/provider/[slug]/features/ModelList/ModelItem.tsx +3 -3
  12. package/src/app/(main)/discover/(list)/models/features/Card.tsx +6 -2
  13. package/src/app/(main)/settings/llm/ProviderList/Cloudflare/index.tsx +1 -5
  14. package/src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +2 -2
  15. package/src/app/@modal/(.)changelog/modal/page.tsx +3 -1
  16. package/src/components/Loading/BrandTextLoading/index.tsx +5 -0
  17. package/src/components/ModelSelect/index.tsx +7 -4
  18. package/src/config/__tests__/app.test.ts +6 -2
  19. package/src/config/app.ts +1 -2
  20. package/src/config/featureFlags/schema.ts +3 -0
  21. package/src/config/modelProviders/ai21.ts +2 -2
  22. package/src/config/modelProviders/ai360.ts +4 -4
  23. package/src/config/modelProviders/anthropic.ts +8 -8
  24. package/src/config/modelProviders/azure.ts +5 -5
  25. package/src/config/modelProviders/baichuan.ts +6 -6
  26. package/src/config/modelProviders/bedrock.ts +14 -14
  27. package/src/config/modelProviders/cloudflare.ts +12 -11
  28. package/src/config/modelProviders/deepseek.ts +1 -1
  29. package/src/config/modelProviders/fireworksai.ts +29 -27
  30. package/src/config/modelProviders/giteeai.ts +7 -7
  31. package/src/config/modelProviders/github.ts +29 -28
  32. package/src/config/modelProviders/google.ts +18 -19
  33. package/src/config/modelProviders/groq.ts +13 -13
  34. package/src/config/modelProviders/higress.ts +195 -194
  35. package/src/config/modelProviders/huggingface.ts +7 -7
  36. package/src/config/modelProviders/hunyuan.ts +25 -17
  37. package/src/config/modelProviders/internlm.ts +6 -4
  38. package/src/config/modelProviders/minimax.ts +5 -5
  39. package/src/config/modelProviders/mistral.ts +14 -16
  40. package/src/config/modelProviders/moonshot.ts +3 -3
  41. package/src/config/modelProviders/novita.ts +15 -15
  42. package/src/config/modelProviders/ollama.ts +46 -46
  43. package/src/config/modelProviders/openai.ts +23 -22
  44. package/src/config/modelProviders/openrouter.ts +20 -18
  45. package/src/config/modelProviders/perplexity.ts +7 -7
  46. package/src/config/modelProviders/qwen.ts +23 -25
  47. package/src/config/modelProviders/sensenova.ts +8 -8
  48. package/src/config/modelProviders/siliconcloud.ts +138 -92
  49. package/src/config/modelProviders/spark.ts +6 -6
  50. package/src/config/modelProviders/stepfun.ts +9 -9
  51. package/src/config/modelProviders/taichu.ts +2 -3
  52. package/src/config/modelProviders/togetherai.ts +57 -48
  53. package/src/config/modelProviders/upstage.ts +3 -3
  54. package/src/config/modelProviders/wenxin.ts +12 -12
  55. package/src/config/modelProviders/xai.ts +4 -4
  56. package/src/config/modelProviders/zeroone.ts +11 -11
  57. package/src/config/modelProviders/zhipu.ts +17 -16
  58. package/src/database/_deprecated/core/model.ts +1 -1
  59. package/src/database/_deprecated/models/sessionGroup.ts +4 -1
  60. package/src/database/client/migrations.json +2 -5
  61. package/src/database/migrations/meta/0012_snapshot.json +176 -518
  62. package/src/database/schemas/agent.ts +1 -1
  63. package/src/database/schemas/message.ts +1 -0
  64. package/src/database/schemas/session.ts +1 -0
  65. package/src/database/server/models/topic.ts +19 -17
  66. package/src/features/ChangelogModal/index.tsx +8 -2
  67. package/src/features/DebugUI/Content.tsx +0 -1
  68. package/src/features/PluginStore/index.tsx +2 -2
  69. package/src/features/User/UserPanel/useMenu.tsx +1 -1
  70. package/src/layout/GlobalProvider/AntdV5MonkeyPatch.tsx +4 -4
  71. package/src/libs/agent-runtime/google/index.ts +4 -3
  72. package/src/libs/agent-runtime/higress/index.ts +1 -1
  73. package/src/libs/agent-runtime/huggingface/index.ts +2 -4
  74. package/src/libs/agent-runtime/minimax/index.ts +5 -10
  75. package/src/libs/agent-runtime/mistral/index.ts +3 -6
  76. package/src/libs/agent-runtime/moonshot/index.ts +3 -6
  77. package/src/libs/agent-runtime/novita/__snapshots__/index.test.ts.snap +18 -18
  78. package/src/libs/agent-runtime/novita/index.ts +1 -1
  79. package/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap +10 -10
  80. package/src/libs/agent-runtime/openrouter/__snapshots__/index.test.ts.snap +168 -168
  81. package/src/libs/agent-runtime/openrouter/index.ts +1 -1
  82. package/src/libs/agent-runtime/perplexity/index.ts +4 -4
  83. package/src/libs/agent-runtime/sensenova/index.ts +9 -3
  84. package/src/libs/agent-runtime/taichu/index.ts +4 -10
  85. package/src/libs/agent-runtime/utils/streams/minimax.test.ts +5 -2
  86. package/src/libs/agent-runtime/utils/streams/minimax.ts +4 -1
  87. package/src/libs/agent-runtime/zhipu/index.ts +12 -13
  88. package/src/libs/langchain/loaders/index.ts +2 -2
  89. package/src/libs/langchain/types.ts +9 -1
  90. package/src/locales/default/modelProvider.ts +1 -1
  91. package/src/migrations/FromV3ToV4/fixtures/ollama-output-v4.json +1 -1
  92. package/src/migrations/FromV6ToV7/types/v7.ts +0 -2
  93. package/src/server/globalConfig/genServerLLMConfig.test.ts +4 -4
  94. package/src/server/globalConfig/genServerLLMConfig.ts +29 -24
  95. package/src/server/globalConfig/index.ts +1 -2
  96. package/src/server/routers/edge/config/__snapshots__/index.test.ts.snap +9 -9
  97. package/src/server/routers/lambda/_template.ts +1 -1
  98. package/src/server/routers/lambda/knowledgeBase.ts +1 -1
  99. package/src/server/routers/lambda/session.ts +1 -1
  100. package/src/server/routers/lambda/sessionGroup.ts +1 -1
  101. package/src/server/routers/lambda/thread.ts +1 -1
  102. package/src/server/services/changelog/index.test.ts +4 -2
  103. package/src/server/services/changelog/index.ts +10 -2
  104. package/src/server/services/nextAuthUser/index.ts +1 -1
  105. package/src/store/serverConfig/selectors.test.ts +1 -0
  106. package/src/store/user/slices/modelList/__snapshots__/action.test.ts.snap +1 -1
  107. package/src/store/user/slices/modelList/action.test.ts +4 -4
  108. package/src/store/user/slices/modelList/reducers/customModelCard.test.ts +6 -6
  109. package/src/store/user/slices/modelList/selectors/modelProvider.ts +3 -2
  110. package/src/tools/dalle/Render/Item/index.tsx +1 -1
  111. package/src/types/files/index.ts +0 -1
  112. package/src/types/llm.ts +4 -5
  113. package/src/utils/__snapshots__/parseModels.test.ts.snap +2 -2
  114. package/src/utils/genUserLLMConfig.test.ts +4 -4
  115. package/src/utils/genUserLLMConfig.ts +6 -4
  116. package/src/utils/parseModels.test.ts +16 -16
  117. package/src/utils/parseModels.ts +1 -1
  118. package/src/utils/server/jwt.ts +2 -6
@@ -2,9 +2,9 @@
2
2
  import { boolean, jsonb, pgTable, primaryKey, text, varchar } from 'drizzle-orm/pg-core';
3
3
  import { createInsertSchema } from 'drizzle-zod';
4
4
 
5
+ import { idGenerator, randomSlug } from '@/database/utils/idGenerator';
5
6
  import { LobeAgentChatConfig, LobeAgentTTSConfig } from '@/types/agent';
6
7
 
7
- import { idGenerator, randomSlug } from '@/database/utils/idGenerator';
8
8
  import { timestamps } from './_helpers';
9
9
  import { files, knowledgeBases } from './file';
10
10
  import { users } from './user';
@@ -13,6 +13,7 @@ import {
13
13
  import { createSelectSchema } from 'drizzle-zod';
14
14
 
15
15
  import { idGenerator } from '@/database/utils/idGenerator';
16
+
16
17
  import { timestamps } from './_helpers';
17
18
  import { agents } from './agent';
18
19
  import { files } from './file';
@@ -3,6 +3,7 @@ import { boolean, integer, pgTable, text, unique, uniqueIndex, varchar } from 'd
3
3
  import { createInsertSchema } from 'drizzle-zod';
4
4
 
5
5
  import { idGenerator, randomSlug } from '@/database/utils/idGenerator';
6
+
6
7
  import { timestamps } from './_helpers';
7
8
  import { users } from './user';
8
9
 
@@ -31,23 +31,25 @@ export class TopicModel {
31
31
 
32
32
  query = async ({ current = 0, pageSize = 9999, sessionId }: QueryTopicParams = {}) => {
33
33
  const offset = current * pageSize;
34
- return this.db
35
- .select({
36
- createdAt: topics.createdAt,
37
- favorite: topics.favorite,
38
- historySummary: topics.historySummary,
39
- id: topics.id,
40
- metadata: topics.metadata,
41
- title: topics.title,
42
- updatedAt: topics.updatedAt,
43
- })
44
- .from(topics)
45
- .where(and(eq(topics.userId, this.userId), this.matchSession(sessionId)))
46
- // In boolean sorting, false is considered "smaller" than true.
47
- // So here we use desc to ensure that topics with favorite as true are in front.
48
- .orderBy(desc(topics.favorite), desc(topics.updatedAt))
49
- .limit(pageSize)
50
- .offset(offset);
34
+ return (
35
+ this.db
36
+ .select({
37
+ createdAt: topics.createdAt,
38
+ favorite: topics.favorite,
39
+ historySummary: topics.historySummary,
40
+ id: topics.id,
41
+ metadata: topics.metadata,
42
+ title: topics.title,
43
+ updatedAt: topics.updatedAt,
44
+ })
45
+ .from(topics)
46
+ .where(and(eq(topics.userId, this.userId), this.matchSession(sessionId)))
47
+ // In boolean sorting, false is considered "smaller" than true.
48
+ // So here we use desc to ensure that topics with favorite as true are in front.
49
+ .orderBy(desc(topics.favorite), desc(topics.updatedAt))
50
+ .limit(pageSize)
51
+ .offset(offset)
52
+ );
51
53
  };
52
54
 
53
55
  findById = async (id: string) => {
@@ -7,11 +7,17 @@ import { memo } from 'react';
7
7
  import { useGlobalStore } from '@/store/global';
8
8
 
9
9
  const ChangelogModal = memo<{ currentId?: string }>(({ currentId }) => {
10
- const latestChangelogId = useGlobalStore((s) => s.status.latestChangelogId);
10
+ const [latestChangelogId, updateSystemStatus] = useGlobalStore((s) => [
11
+ s.status.latestChangelogId,
12
+ s.updateSystemStatus,
13
+ ]);
11
14
  const router = useRouter();
12
15
 
13
16
  useTimeout(() => {
14
- if (latestChangelogId !== currentId) {
17
+ if (!currentId) return;
18
+ if (!latestChangelogId) {
19
+ updateSystemStatus({ latestChangelogId: currentId });
20
+ } else if (latestChangelogId !== currentId) {
15
21
  router.push('/changelog/modal');
16
22
  }
17
23
  }, 1000);
@@ -1,4 +1,3 @@
1
-
2
1
  import { Icon } from '@lobehub/ui';
3
2
  import { App, FloatButton, Spin } from 'antd';
4
3
  import { DatabaseIcon, Loader2 } from 'lucide-react';
@@ -31,8 +31,8 @@ export const PluginStore = memo<PluginStoreProps>(({ setOpen, open }) => {
31
31
  title={t('store.title')}
32
32
  width={800}
33
33
  >
34
- <Flexbox
35
- gap={ mobile ? 8 : 16 }
34
+ <Flexbox
35
+ gap={mobile ? 8 : 16}
36
36
  style={{ maxHeight: mobile ? '-webkit-fill-available' : 'inherit' }}
37
37
  width={'100%'}
38
38
  >
@@ -188,7 +188,7 @@ export const useMenu = () => {
188
188
  {
189
189
  icon: <Icon icon={FileClockIcon} />,
190
190
  key: 'changelog',
191
- label: <Link href={'/changelog'}>{t('changelog')}</Link>,
191
+ label: <Link href={'/changelog/modal'}>{t('changelog')}</Link>,
192
192
  },
193
193
  {
194
194
  children: [
@@ -1,8 +1,8 @@
1
- "use client";
1
+ 'use client';
2
2
 
3
- import { useEffect } from "react";
4
- import { unstableSetRender } from "antd";
5
- import { createRoot } from "react-dom/client";
3
+ import { unstableSetRender } from 'antd';
4
+ import { useEffect } from 'react';
5
+ import { createRoot } from 'react-dom/client';
6
6
 
7
7
  const AntdV5MonkeyPatch = () => {
8
8
  useEffect(() => {
@@ -289,9 +289,10 @@ export class LobeGoogleAI implements LobeRuntimeAI {
289
289
  const functionDeclaration = tool.function;
290
290
  const parameters = functionDeclaration.parameters;
291
291
  // refs: https://github.com/lobehub/lobe-chat/pull/5002
292
- const properties = parameters?.properties && Object.keys(parameters.properties).length > 0
293
- ? parameters.properties
294
- : { dummy: { type: 'string' } }; // dummy property to avoid empty object
292
+ const properties =
293
+ parameters?.properties && Object.keys(parameters.properties).length > 0
294
+ ? parameters.properties
295
+ : { dummy: { type: 'string' } }; // dummy property to avoid empty object
295
296
 
296
297
  return {
297
298
  description: functionDeclaration.description,
@@ -23,6 +23,7 @@ export const LobeHigressAI = LobeOpenAICompatibleFactory({
23
23
  const model = m as any;
24
24
 
25
25
  return {
26
+ contextWindowTokens: model.context_length,
26
27
  description: model.description,
27
28
  displayName: model.name,
28
29
  enabled: LOBE_DEFAULT_MODEL_LIST.find((m) => model.id.endsWith(m.id))?.enabled || false,
@@ -33,7 +34,6 @@ export const LobeHigressAI = LobeOpenAICompatibleFactory({
33
34
  typeof model.top_provider.max_completion_tokens === 'number'
34
35
  ? model.top_provider.max_completion_tokens
35
36
  : undefined,
36
- tokens: model.context_length,
37
37
  vision:
38
38
  model.description.includes('vision') ||
39
39
  model.description.includes('multimodal') ||
@@ -22,11 +22,9 @@ export const LobeHuggingFaceAI = LobeOpenAICompatibleFactory({
22
22
  },
23
23
  customClient: {
24
24
  createChatCompletionStream: (client: HfInference, payload, instance) => {
25
- const { max_tokens = 4096} = payload;
25
+ const { max_tokens = 4096 } = payload;
26
26
  const hfRes = client.chatCompletionStream({
27
- endpointUrl: instance.baseURL
28
- ? urlJoin(instance.baseURL, payload.model)
29
- : instance.baseURL,
27
+ endpointUrl: instance.baseURL ? urlJoin(instance.baseURL, payload.model) : instance.baseURL,
30
28
  max_tokens: max_tokens,
31
29
  messages: payload.messages,
32
30
  model: payload.model,
@@ -129,8 +129,8 @@ export class LobeMinimaxAI implements LobeRuntimeAI {
129
129
  switch (model) {
130
130
  case 'abab6.5t-chat':
131
131
  case 'abab6.5g-chat':
132
- case 'abab5.5s-chat':
133
- case 'abab5.5-chat':{
132
+ case 'abab5.5s-chat':
133
+ case 'abab5.5-chat': {
134
134
  return 4096;
135
135
  }
136
136
  case 'abab6.5s-chat': {
@@ -145,16 +145,11 @@ export class LobeMinimaxAI implements LobeRuntimeAI {
145
145
  return {
146
146
  ...params,
147
147
  frequency_penalty: undefined,
148
- max_tokens:
149
- payload.max_tokens !== undefined
150
- ? payload.max_tokens
151
- : this.getMaxTokens(payload.model),
148
+ max_tokens:
149
+ payload.max_tokens !== undefined ? payload.max_tokens : this.getMaxTokens(payload.model),
152
150
  presence_penalty: undefined,
153
151
  stream: true,
154
- temperature:
155
- temperature === undefined || temperature <= 0
156
- ? undefined
157
- : temperature / 2,
152
+ temperature: temperature === undefined || temperature <= 0 ? undefined : temperature / 2,
158
153
 
159
154
  tools: params.tools?.map((tool) => ({
160
155
  function: {
@@ -5,15 +5,12 @@ export const LobeMistralAI = LobeOpenAICompatibleFactory({
5
5
  baseURL: 'https://api.mistral.ai/v1',
6
6
  chatCompletion: {
7
7
  handlePayload: (payload) => ({
8
- ...payload.max_tokens !== undefined && { max_tokens: payload.max_tokens },
8
+ ...(payload.max_tokens !== undefined && { max_tokens: payload.max_tokens }),
9
9
  messages: payload.messages as any,
10
10
  model: payload.model,
11
11
  stream: true,
12
- temperature:
13
- payload.temperature !== undefined
14
- ? payload.temperature / 2
15
- : undefined,
16
- ...payload.tools && { tools: payload.tools },
12
+ temperature: payload.temperature !== undefined ? payload.temperature / 2 : undefined,
13
+ ...(payload.tools && { tools: payload.tools }),
17
14
  top_p: payload.top_p,
18
15
  }),
19
16
  noUserId: true,
@@ -9,12 +9,9 @@ export const LobeMoonshotAI = LobeOpenAICompatibleFactory({
9
9
  handlePayload: (payload: ChatStreamPayload) => {
10
10
  const { temperature, ...rest } = payload;
11
11
 
12
- return {
13
- ...rest,
14
- temperature:
15
- temperature !== undefined
16
- ? temperature / 2
17
- : undefined,
12
+ return {
13
+ ...rest,
14
+ temperature: temperature !== undefined ? temperature / 2 : undefined,
18
15
  } as OpenAI.ChatCompletionCreateParamsStreaming;
19
16
  },
20
17
  },
@@ -3,149 +3,149 @@
3
3
  exports[`NovitaAI > models > should get models 1`] = `
4
4
  [
5
5
  {
6
+ "contextWindowTokens": 8192,
6
7
  "description": "Meta's latest class of model (Llama 3) launched with a variety of sizes & flavors. This 8B instruct-tuned version was optimized for high quality dialogue usecases. It has demonstrated strong performance compared to leading closed-source models in human evaluations.",
7
8
  "displayName": "meta-llama/llama-3-8b-instruct",
8
9
  "enabled": true,
9
10
  "functionCall": false,
10
11
  "id": "meta-llama/llama-3-8b-instruct",
11
- "tokens": 8192,
12
12
  },
13
13
  {
14
+ "contextWindowTokens": 8192,
14
15
  "description": "Meta's latest class of model (Llama 3) launched with a variety of sizes & flavors. This 70B instruct-tuned version was optimized for high quality dialogue usecases. It has demonstrated strong performance compared to leading closed-source models in human evaluations.",
15
16
  "displayName": "meta-llama/llama-3-70b-instruct",
16
17
  "enabled": true,
17
18
  "functionCall": false,
18
19
  "id": "meta-llama/llama-3-70b-instruct",
19
- "tokens": 8192,
20
20
  },
21
21
  {
22
+ "contextWindowTokens": 8192,
22
23
  "description": "Meta's latest class of models, Llama 3.1, launched with a variety of sizes and configurations. The 8B instruct-tuned version is particularly fast and efficient. It has demonstrated strong performance in human evaluations, outperforming several leading closed-source models.",
23
24
  "displayName": "meta-llama/llama-3.1-8b-instruct",
24
25
  "enabled": true,
25
26
  "functionCall": false,
26
27
  "id": "meta-llama/llama-3.1-8b-instruct",
27
- "tokens": 8192,
28
28
  },
29
29
  {
30
+ "contextWindowTokens": 8192,
30
31
  "description": "Meta's latest class of models, Llama 3.1, has launched with a variety of sizes and configurations. The 70B instruct-tuned version is optimized for high-quality dialogue use cases. It has demonstrated strong performance in human evaluations compared to leading closed-source models.",
31
32
  "displayName": "meta-llama/llama-3.1-70b-instruct",
32
33
  "enabled": true,
33
34
  "functionCall": false,
34
35
  "id": "meta-llama/llama-3.1-70b-instruct",
35
- "tokens": 8192,
36
36
  },
37
37
  {
38
+ "contextWindowTokens": 32768,
38
39
  "description": "Meta's latest class of models, Llama 3.1, launched with a variety of sizes and configurations. This 405B instruct-tuned version is optimized for high-quality dialogue use cases. It has demonstrated strong performance compared to leading closed-source models, including GPT-4o and Claude 3.5 Sonnet, in evaluations.",
39
40
  "displayName": "meta-llama/llama-3.1-405b-instruct",
40
41
  "enabled": true,
41
42
  "functionCall": false,
42
43
  "id": "meta-llama/llama-3.1-405b-instruct",
43
- "tokens": 32768,
44
44
  },
45
45
  {
46
+ "contextWindowTokens": 8192,
46
47
  "description": "Gemma 2 9B by Google is an advanced, open-source language model that sets a new standard for efficiency and performance in its size class.
47
48
  Designed for a wide variety of tasks, it empowers developers and researchers to build innovative applications, while maintaining accessibility, safety, and cost-effectiveness.",
48
49
  "displayName": "google/gemma-2-9b-it",
49
50
  "enabled": true,
50
51
  "functionCall": false,
51
52
  "id": "google/gemma-2-9b-it",
52
- "tokens": 8192,
53
53
  },
54
54
  {
55
+ "contextWindowTokens": 4096,
55
56
  "description": "This is a fine-tuned Llama-2 model designed to support longer and more detailed writing prompts, as well as next-chapter generation. It also includes an experimental role-playing instruction set with multi-round dialogues, character interactions, and varying numbers of participants",
56
57
  "displayName": "jondurbin/airoboros-l2-70b",
57
58
  "enabled": true,
58
59
  "functionCall": false,
59
60
  "id": "jondurbin/airoboros-l2-70b",
60
- "tokens": 4096,
61
61
  },
62
62
  {
63
+ "contextWindowTokens": 8192,
63
64
  "description": "Hermes 2 Pro is an upgraded, retrained version of Nous Hermes 2, consisting of an updated and cleaned version of the OpenHermes 2.5 Dataset, as well as a newly introduced Function Calling and JSON Mode dataset developed in-house.",
64
65
  "displayName": "nousresearch/hermes-2-pro-llama-3-8b",
65
66
  "enabled": true,
66
67
  "functionCall": true,
67
68
  "id": "nousresearch/hermes-2-pro-llama-3-8b",
68
- "tokens": 8192,
69
69
  },
70
70
  {
71
+ "contextWindowTokens": 32768,
71
72
  "description": "A high-performing, industry-standard 7.3B parameter model, with optimizations for speed and context length.",
72
73
  "displayName": "mistralai/mistral-7b-instruct",
73
74
  "enabled": true,
74
75
  "functionCall": false,
75
76
  "id": "mistralai/mistral-7b-instruct",
76
- "tokens": 32768,
77
77
  },
78
78
  {
79
+ "contextWindowTokens": 16000,
79
80
  "description": "Dolphin 2.9 is designed for instruction following, conversational, and coding. This model is a finetune of Mixtral 8x22B Instruct. It features a 64k context length and was fine-tuned with a 16k sequence length using ChatML templates.The model is uncensored and is stripped of alignment and bias. It requires an external alignment layer for ethical use.",
80
81
  "displayName": "cognitivecomputations/dolphin-mixtral-8x22b",
81
82
  "enabled": true,
82
83
  "functionCall": false,
83
84
  "id": "cognitivecomputations/dolphin-mixtral-8x22b",
84
- "tokens": 16000,
85
85
  },
86
86
  {
87
+ "contextWindowTokens": 16000,
87
88
  "description": "The uncensored llama3 model is a powerhouse of creativity, excelling in both roleplay and story writing. It offers a liberating experience during roleplays, free from any restrictions. This model stands out for its immense creativity, boasting a vast array of unique ideas and plots, truly a treasure trove for those seeking originality. Its unrestricted nature during roleplays allows for the full breadth of imagination to unfold, akin to an enhanced, big-brained version of Stheno. Perfect for creative minds seeking a boundless platform for their imaginative expressions, the uncensored llama3 model is an ideal choice",
88
89
  "displayName": "sao10k/l3-70b-euryale-v2.1",
89
90
  "enabled": true,
90
91
  "functionCall": false,
91
92
  "id": "sao10k/l3-70b-euryale-v2.1",
92
- "tokens": 16000,
93
93
  },
94
94
  {
95
+ "contextWindowTokens": 4096,
95
96
  "description": "A merge with a complex family tree, this model was crafted for roleplaying and storytelling. Midnight Rose is a successor to Rogue Rose and Aurora Nights and improves upon them both. It wants to produce lengthy output by default and is the best creative writing merge produced so far by sophosympatheia.",
96
97
  "displayName": "sophosympatheia/midnight-rose-70b",
97
98
  "enabled": true,
98
99
  "functionCall": false,
99
100
  "id": "sophosympatheia/midnight-rose-70b",
100
- "tokens": 4096,
101
101
  },
102
102
  {
103
+ "contextWindowTokens": 4096,
103
104
  "description": "The idea behind this merge is that each layer is composed of several tensors, which are in turn responsible for specific functions. Using MythoLogic-L2's robust understanding as its input and Huginn's extensive writing capability as its output seems to have resulted in a model that exceeds at both, confirming my theory. (More details to be released at a later time).",
104
105
  "displayName": "gryphe/mythomax-l2-13b",
105
106
  "enabled": true,
106
107
  "functionCall": false,
107
108
  "id": "gryphe/mythomax-l2-13b",
108
- "tokens": 4096,
109
109
  },
110
110
  {
111
+ "contextWindowTokens": 4096,
111
112
  "description": "Nous-Hermes-Llama2-13b is a state-of-the-art language model fine-tuned on over 300,000 instructions. This model was fine-tuned by Nous Research, with Teknium and Emozilla leading the fine tuning process and dataset curation, Redmond AI sponsoring the compute, and several other contributors.",
112
113
  "displayName": "nousresearch/nous-hermes-llama2-13b",
113
114
  "enabled": true,
114
115
  "functionCall": false,
115
116
  "id": "nousresearch/nous-hermes-llama2-13b",
116
- "tokens": 4096,
117
117
  },
118
118
  {
119
+ "contextWindowTokens": 32768,
119
120
  "description": "Nous Hermes 2 Mixtral 8x7B DPO is the new flagship Nous Research model trained over the Mixtral 8x7B MoE LLM. The model was trained on over 1,000,000 entries of primarily GPT-4 generated data, as well as other high quality data from open datasets across the AI landscape, achieving state of the art performance on a variety of tasks.",
120
121
  "displayName": "Nous-Hermes-2-Mixtral-8x7B-DPO",
121
122
  "enabled": true,
122
123
  "functionCall": false,
123
124
  "id": "Nous-Hermes-2-Mixtral-8x7B-DPO",
124
- "tokens": 32768,
125
125
  },
126
126
  {
127
+ "contextWindowTokens": 4096,
127
128
  "description": "A Mythomax/MLewd_13B-style merge of selected 70B models. A multi-model merge of several LLaMA2 70B finetunes for roleplaying and creative work. The goal was to create a model that combines creativity with intelligence for an enhanced experience.",
128
129
  "displayName": "lzlv_70b",
129
130
  "enabled": true,
130
131
  "functionCall": false,
131
132
  "id": "lzlv_70b",
132
- "tokens": 4096,
133
133
  },
134
134
  {
135
+ "contextWindowTokens": 4096,
135
136
  "description": "OpenHermes 2.5 Mistral 7B is a state of the art Mistral Fine-tune, a continuation of OpenHermes 2 model, which trained on additional code datasets.",
136
137
  "displayName": "teknium/openhermes-2.5-mistral-7b",
137
138
  "enabled": true,
138
139
  "functionCall": false,
139
140
  "id": "teknium/openhermes-2.5-mistral-7b",
140
- "tokens": 4096,
141
141
  },
142
142
  {
143
+ "contextWindowTokens": 65535,
143
144
  "description": "WizardLM-2 8x22B is Microsoft AI's most advanced Wizard model. It demonstrates highly competitive performance compared to leading proprietary models, and it consistently outperforms all existing state-of-the-art opensource models.",
144
145
  "displayName": "microsoft/wizardlm-2-8x22b",
145
146
  "enabled": true,
146
147
  "functionCall": false,
147
148
  "id": "microsoft/wizardlm-2-8x22b",
148
- "tokens": 65535,
149
149
  },
150
150
  ]
151
151
  `;
@@ -17,12 +17,12 @@ export const LobeNovitaAI = LobeOpenAICompatibleFactory({
17
17
  const model = m as unknown as NovitaModelCard;
18
18
 
19
19
  return {
20
+ contextWindowTokens: model.context_size,
20
21
  description: model.description,
21
22
  displayName: model.title,
22
23
  enabled: model.status === 1,
23
24
  functionCall: model.description.toLowerCase().includes('function calling'),
24
25
  id: model.id,
25
- tokens: model.context_size,
26
26
  };
27
27
  },
28
28
  },
@@ -3,6 +3,7 @@
3
3
  exports[`LobeOpenAI > models > should get models 1`] = `
4
4
  [
5
5
  {
6
+ "contextWindowTokens": 16385,
6
7
  "description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125",
7
8
  "displayName": "GPT-3.5 Turbo",
8
9
  "functionCall": true,
@@ -11,7 +12,6 @@ exports[`LobeOpenAI > models > should get models 1`] = `
11
12
  "input": 0.5,
12
13
  "output": 1.5,
13
14
  },
14
- "tokens": 16385,
15
15
  },
16
16
  {
17
17
  "id": "gpt-3.5-turbo-16k",
@@ -26,6 +26,7 @@ exports[`LobeOpenAI > models > should get models 1`] = `
26
26
  "id": "gpt-3.5-turbo-instruct-0914",
27
27
  },
28
28
  {
29
+ "contextWindowTokens": 128000,
29
30
  "description": "最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。",
30
31
  "displayName": "GPT-4 Turbo Preview 0125",
31
32
  "functionCall": true,
@@ -34,9 +35,9 @@ exports[`LobeOpenAI > models > should get models 1`] = `
34
35
  "input": 10,
35
36
  "output": 30,
36
37
  },
37
- "tokens": 128000,
38
38
  },
39
39
  {
40
+ "contextWindowTokens": 128000,
40
41
  "description": "最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。",
41
42
  "displayName": "GPT-4 Turbo Preview",
42
43
  "functionCall": true,
@@ -45,9 +46,9 @@ exports[`LobeOpenAI > models > should get models 1`] = `
45
46
  "input": 10,
46
47
  "output": 30,
47
48
  },
48
- "tokens": 128000,
49
49
  },
50
50
  {
51
+ "contextWindowTokens": 4096,
51
52
  "description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125",
52
53
  "displayName": "GPT-3.5 Turbo Instruct",
53
54
  "id": "gpt-3.5-turbo-instruct",
@@ -55,7 +56,6 @@ exports[`LobeOpenAI > models > should get models 1`] = `
55
56
  "input": 1.5,
56
57
  "output": 2,
57
58
  },
58
- "tokens": 4096,
59
59
  },
60
60
  {
61
61
  "id": "gpt-3.5-turbo-0301",
@@ -64,6 +64,7 @@ exports[`LobeOpenAI > models > should get models 1`] = `
64
64
  "id": "gpt-3.5-turbo-0613",
65
65
  },
66
66
  {
67
+ "contextWindowTokens": 16385,
67
68
  "description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125",
68
69
  "displayName": "GPT-3.5 Turbo 1106",
69
70
  "functionCall": true,
@@ -72,9 +73,9 @@ exports[`LobeOpenAI > models > should get models 1`] = `
72
73
  "input": 1,
73
74
  "output": 2,
74
75
  },
75
- "tokens": 16385,
76
76
  },
77
77
  {
78
+ "contextWindowTokens": 128000,
78
79
  "description": "最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。",
79
80
  "displayName": "GPT-4 Turbo Preview 1106",
80
81
  "functionCall": true,
@@ -83,17 +84,17 @@ exports[`LobeOpenAI > models > should get models 1`] = `
83
84
  "input": 10,
84
85
  "output": 30,
85
86
  },
86
- "tokens": 128000,
87
87
  },
88
88
  {
89
+ "contextWindowTokens": 128000,
89
90
  "deploymentName": "gpt-4-vision",
90
91
  "description": "GPT-4 视觉预览版,专为图像分析和处理任务设计。",
91
92
  "displayName": "GPT 4 Turbo with Vision Preview",
92
93
  "id": "gpt-4-vision-preview",
93
- "tokens": 128000,
94
94
  "vision": true,
95
95
  },
96
96
  {
97
+ "contextWindowTokens": 8192,
97
98
  "description": "GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。",
98
99
  "displayName": "GPT-4",
99
100
  "functionCall": true,
@@ -102,9 +103,9 @@ exports[`LobeOpenAI > models > should get models 1`] = `
102
103
  "input": 30,
103
104
  "output": 60,
104
105
  },
105
- "tokens": 8192,
106
106
  },
107
107
  {
108
+ "contextWindowTokens": 16385,
108
109
  "description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125",
109
110
  "displayName": "GPT-3.5 Turbo 0125",
110
111
  "functionCall": true,
@@ -113,9 +114,9 @@ exports[`LobeOpenAI > models > should get models 1`] = `
113
114
  "input": 0.5,
114
115
  "output": 1.5,
115
116
  },
116
- "tokens": 16385,
117
117
  },
118
118
  {
119
+ "contextWindowTokens": 8192,
119
120
  "description": "GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。",
120
121
  "displayName": "GPT-4 0613",
121
122
  "functionCall": true,
@@ -124,7 +125,6 @@ exports[`LobeOpenAI > models > should get models 1`] = `
124
125
  "input": 30,
125
126
  "output": 60,
126
127
  },
127
- "tokens": 8192,
128
128
  },
129
129
  ]
130
130
  `;