mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-17 07:17:18 +00:00
feat(models): show LangBot Models availability
This commit is contained in:
@@ -158,6 +158,24 @@ export interface RerankModel {
|
||||
extra_args?: object;
|
||||
}
|
||||
|
||||
export interface LangBotModelAvailability {
|
||||
up: boolean | null;
|
||||
last_probed_at: string | null;
|
||||
latency_ms: number;
|
||||
http_code: number;
|
||||
}
|
||||
|
||||
export interface LangBotModelAvailabilityItem {
|
||||
uuid: string;
|
||||
model_id: string;
|
||||
category: string | null;
|
||||
availability: LangBotModelAvailability;
|
||||
}
|
||||
|
||||
export interface ApiRespLangBotModelAvailability {
|
||||
models: LangBotModelAvailabilityItem[];
|
||||
}
|
||||
|
||||
export interface ApiRespPipelines {
|
||||
pipelines: Pipeline[];
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ import {
|
||||
BotRouteDryRunRequest,
|
||||
BotRouteDryRunResult,
|
||||
BotEventRouteStatusResponse,
|
||||
ApiRespLangBotModelAvailability,
|
||||
} from '@/app/infra/entities/api';
|
||||
import { Plugin } from '@/app/infra/entities/plugin';
|
||||
import type { PluginLogEntry } from '@/app/infra/entities/plugin';
|
||||
@@ -1250,6 +1251,10 @@ export class BackendClient extends BaseHttpClient {
|
||||
return this.get('/api/v1/system/wizard/recommended-model');
|
||||
}
|
||||
|
||||
public getLangBotModelAvailability(): Promise<ApiRespLangBotModelAvailability> {
|
||||
return this.get('/api/v1/system/model-availability');
|
||||
}
|
||||
|
||||
public getAsyncTasks(params?: {
|
||||
type?: string;
|
||||
kind?: string;
|
||||
|
||||
Reference in New Issue
Block a user