PowerGrid / frontend /src /api /client.js
saiteja020's picture
Enable multi-model LLM evaluation and deprioritize peak shaving in grading
71a770c
Raw
History Blame Contribute Delete
738 Bytes
import axios from 'axios'
const api = axios.create({
baseURL: '/api',
timeout: 600000, // 10 min – long evaluations
})
export const getHealth = () => api.get('/health').then(r => r.data)
export const getModels = () => api.get('/models').then(r => r.data.models)
export const getTasks = () => api.get('/tasks').then(r => r.data.tasks)
export const runEpisode = (body) => api.post('/run-episode', body).then(r => r.data)
export const runEvaluate = (body) => api.post('/evaluate', body).then(r => r.data)
export const runLLM = (evalResult, provider = "GEMINI", model_name = null) =>
api.post('/llm-analyze', { evaluation: evalResult, provider, model_name }).then(r => r.data)
export default api