feat: add memory v2 admin controls
This commit is contained in:
@@ -26,6 +26,9 @@ import type {
|
||||
PolicyMap,
|
||||
PortalUser,
|
||||
MindSpaceAdminConfig,
|
||||
MemoryV2AdminConfig,
|
||||
MemoryV2AdminConfigResponse,
|
||||
MemoryV2ModelApiType,
|
||||
SkillDefinition,
|
||||
SkillMap,
|
||||
UsageRecord,
|
||||
@@ -278,6 +281,35 @@ export async function updateMindSpaceAdminConfig(
|
||||
return result.config;
|
||||
}
|
||||
|
||||
export async function getMemoryV2AdminConfig(): Promise<MemoryV2AdminConfigResponse> {
|
||||
return portalFetch('/admin-api/memory-v2/config');
|
||||
}
|
||||
|
||||
export async function updateMemoryV2AdminConfig(
|
||||
payload: Partial<MemoryV2AdminConfig>,
|
||||
): Promise<MemoryV2AdminConfigResponse> {
|
||||
return portalFetch('/admin-api/memory-v2/config', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
}
|
||||
|
||||
export async function listMemoryV2ModelOptions(): Promise<{
|
||||
global: LlmGlobalSettings;
|
||||
keys: LlmProviderKeyRow[];
|
||||
supportedApiTypes: MemoryV2ModelApiType[];
|
||||
}> {
|
||||
const [global, keys] = await Promise.all([
|
||||
getLlmGlobalSettings(),
|
||||
listLlmProviderKeys(),
|
||||
]);
|
||||
return {
|
||||
global,
|
||||
keys,
|
||||
supportedApiTypes: ['chat', 'response'],
|
||||
};
|
||||
}
|
||||
|
||||
export async function listWechatBindings(params?: {
|
||||
search?: string;
|
||||
limit?: number;
|
||||
|
||||
Reference in New Issue
Block a user