mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-31 14:43:35 +00:00
Merge branch 'master' into feature/expand-project-with-ai
This commit is contained in:
@@ -18,6 +18,9 @@ import type {
|
||||
PathValidationResponse,
|
||||
AssistantConversation,
|
||||
AssistantConversationDetail,
|
||||
Settings,
|
||||
SettingsUpdate,
|
||||
ModelsResponse,
|
||||
} from './types'
|
||||
|
||||
const API_BASE = '/api'
|
||||
@@ -279,3 +282,22 @@ export async function deleteAssistantConversation(
|
||||
{ method: 'DELETE' }
|
||||
)
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Settings API
|
||||
// ============================================================================
|
||||
|
||||
export async function getAvailableModels(): Promise<ModelsResponse> {
|
||||
return fetchJSON('/settings/models')
|
||||
}
|
||||
|
||||
export async function getSettings(): Promise<Settings> {
|
||||
return fetchJSON('/settings')
|
||||
}
|
||||
|
||||
export async function updateSettings(settings: SettingsUpdate): Promise<Settings> {
|
||||
return fetchJSON('/settings', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(settings),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user