mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-31 22:26:36 +08:00
31 lines
865 B
TypeScript
31 lines
865 B
TypeScript
import type { GetSessionListVO } from './types';
|
|
import { get, post } from '@/utils/request';
|
|
|
|
// 获取当前用户的模型列表
|
|
export function getModelList() {
|
|
// return get<GetSessionListVO[]>('/system/model/modelList');
|
|
return get<GetSessionListVO[]>('/ai-chat/model').json();
|
|
}
|
|
// 申请ApiKey
|
|
export function applyApiKey() {
|
|
return post<any>('/token').json();
|
|
}
|
|
// 获取ApiKey
|
|
export function getApiKey() {
|
|
return get<any>('/token').json();
|
|
}
|
|
|
|
// 查询充值记录
|
|
export function getRechargeLog() {
|
|
return get<any>('/recharge/account').json();
|
|
}
|
|
|
|
// 查询用户近7天token消耗
|
|
export function getLast7DaysTokenUsage() {
|
|
return get<any>('/usage-statistics/last7Days-token-usage').json();
|
|
}
|
|
// 查询用户token消耗各模型占比
|
|
export function getModelTokenUsage() {
|
|
return get<any>('/usage-statistics/model-token-usage').json();
|
|
}
|