АРЧ - UI и domain loop: синхронизировать локальную LLM-модель через shared config + КВИН 3

This commit is contained in:
2026-04-15 09:15:35 +03:00
parent bc381c012e
commit 8866176be6
24 changed files with 801 additions and 73 deletions
+26
View File
@@ -41,6 +41,32 @@ async function request<T>(path: string, init?: RequestInit): Promise<T> {
}
export const apiClient = {
async loadSharedConnectionConfig(): Promise<{
ok: boolean;
connection: Omit<ConnectionState, "apiKey"> | null;
updated_at: string | null;
exists: boolean;
}> {
return request("/llm/shared-connection");
},
async saveSharedConnectionConfig(connection: ConnectionState): Promise<{
ok: boolean;
connection: Omit<ConnectionState, "apiKey">;
updated_at: string;
}> {
return request("/llm/shared-connection", {
method: "POST",
body: JSON.stringify({
llmProvider: connection.llmProvider,
model: connection.model,
baseUrl: connection.baseUrl,
temperature: connection.temperature,
maxOutputTokens: connection.maxOutputTokens
})
});
},
async listModels(connection: ConnectionState): Promise<{ ok: boolean; models: string[]; count: number; timestamp: string }> {
return request("/llm/models", {
method: "POST",