mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-05 22:33:24 +08:00
* feat:提交前端代码 * feat:提交logo样式切换 * feat:替换avatar、部分位置icon、chatchat相关说明、git链接、Wiki链接、关于、设置、反馈与建议等功能,关闭lobehub自检更新功能 * fix:移除多余代码 --------- Co-authored-by: liunux4odoo <41217877+liunux4odoo@users.noreply.github.com>
23 lines
615 B
TypeScript
23 lines
615 B
TypeScript
import { LobeChatAgentsMarketIndex } from '@/types/market';
|
|
|
|
import { API_ENDPOINTS } from './_url';
|
|
|
|
class MarketService {
|
|
getAgentList = async (locale: string): Promise<LobeChatAgentsMarketIndex> => {
|
|
const res = await fetch(`${API_ENDPOINTS.market}?locale=${locale}`);
|
|
|
|
return res.json();
|
|
};
|
|
|
|
/**
|
|
* 请求助手 manifest
|
|
*/
|
|
getAgentManifest = async (identifier: string, locale: string) => {
|
|
if (!identifier) return;
|
|
const res = await fetch(`${API_ENDPOINTS.marketItem(identifier)}?locale=${locale}`);
|
|
|
|
return res.json();
|
|
};
|
|
}
|
|
export const marketService = new MarketService();
|