forked from lobehub/lobe-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconst.ts
33 lines (27 loc) · 1.05 KB
/
const.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { resolve } from 'node:path';
import { DEFAULT_MODEL_PROVIDER_LIST } from '@/config/modelProviders';
export const root = resolve(__dirname, '../..');
export interface DataItem {
author: string;
createdAt: string;
homepage: string;
identifier: string;
meta: { avatar: string; description: string; tags: string[]; title: string };
}
export const AGENT_URL = 'https://chat-agents.lobehub.com/index.json';
export const AGENT_I18N_URL = (lang: string) =>
`https://chat-agents.lobehub.com/index.${lang}.json`;
export const PLUGIN_URL = 'https://chat-plugins.lobehub.com/index.json';
export const PLUGIN_I18N_URL = (lang: string) =>
`https://chat-plugins.lobehub.com/index.${lang}.json`;
export const AGENT_SPLIT = '<!-- AGENT LIST -->';
export const PLUGIN_SPLIT = '<!-- PLUGIN LIST -->';
export const PROVIDER_SPLIT = '<!-- PROVIDER LIST -->';
export const PROVIDER_LIST = DEFAULT_MODEL_PROVIDER_LIST.filter(
(item) => item.chatModels.length > 0 && item.id !== 'lobehub',
).map((item) => {
return {
id: item.id,
name: item.name,
};
});