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

Method getSessions

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

Source from the content-addressed store, hash-verified

133
134 // Session Management
135 async getSessions(): Promise<SessionResponse> {
136 try {
137 const response = await fetch(`${API_BASE_URL}/sessions`);
138 if (!response.ok) {
139 throw new Error(`Failed to get sessions: ${response.status}`);
140 }
141 return await response.json();
142 } catch (error) {
143 console.error('Get sessions failed:', error);
144 throw error;
145 }
146 }
147
148 async createSession(title: string = 'New Chat', model: string = 'llama3.2:latest'): Promise<ChatSession> {
149 try {

Callers 1

SessionSidebarFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected