()
| 3 | import { state } from "~/lib/state" |
| 4 | |
| 5 | export const getModels = async () => { |
| 6 | const response = await fetch(`${copilotBaseUrl(state)}/models`, { |
| 7 | headers: copilotHeaders(state), |
| 8 | }) |
| 9 | |
| 10 | if (!response.ok) throw new HTTPError("Failed to get models", response) |
| 11 | |
| 12 | return (await response.json()) as ModelsResponse |
| 13 | } |
| 14 | |
| 15 | export interface ModelsResponse { |
| 16 | data: Array<Model> |
no test coverage detected
searching dependent graphs…