Files
Hermes-ui/src/api/system.ts
T

26 lines
478 B
TypeScript
Raw Normal View History

2026-04-11 15:59:14 +08:00
import { request } from './client'
export interface HealthResponse {
status: string
version?: string
}
export interface Model {
id: string
object: string
owned_by: string
}
export interface ModelsResponse {
object: string
data: Model[]
}
export async function checkHealth(): Promise<HealthResponse> {
return request<HealthResponse>('/health')
}
export async function fetchModels(): Promise<ModelsResponse> {
return request<ModelsResponse>('/v1/models')
}