MCPcopy Create free account
hub / github.com/PromtEngineer/localGPT / getModels

Method getModels

src/lib/api.ts:422–428  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

420
421 // ---------------- Models ----------------
422 async getModels(): Promise<ModelsResponse> {
423 const resp = await fetch(`${API_BASE_URL}/models`);
424 if (!resp.ok) {
425 throw new Error(`Failed to fetch models list: ${resp.status}`);
426 }
427 return resp.json();
428 }
429
430 async getSessionDocuments(sessionId: string): Promise<{ files: string[]; file_count: number; session: ChatSession }> {
431 const resp = await fetch(`${API_BASE_URL}/sessions/${sessionId}/documents`);

Callers 3

ModelSelectFunction · 0.80
session-chat.tsxFile · 0.80
QuickChatFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected