mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
feat: add llm-config API service with getGlobalLLMConfigs endpoint
This commit is contained in:
parent
66e0d31f68
commit
cb8e4ab1b7
1 changed files with 38 additions and 0 deletions
38
surfsense_web/lib/apis/llm-config-api.service.ts
Normal file
38
surfsense_web/lib/apis/llm-config-api.service.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import {
|
||||
type CreateLLMConfigRequest,
|
||||
createLLMConfigRequest,
|
||||
createLLMConfigResponse,
|
||||
type DeleteLLMConfigRequest,
|
||||
deleteLLMConfigRequest,
|
||||
deleteLLMConfigResponse,
|
||||
type GetGlobalLLMConfigsResponse,
|
||||
type GetLLMConfigRequest,
|
||||
type GetLLMConfigsRequest,
|
||||
type GetLLMPreferencesRequest,
|
||||
getGlobalLLMConfigsResponse,
|
||||
getLLMConfigRequest,
|
||||
getLLMConfigResponse,
|
||||
getLLMConfigsRequest,
|
||||
getLLMConfigsResponse,
|
||||
getLLMPreferencesRequest,
|
||||
getLLMPreferencesResponse,
|
||||
type UpdateLLMConfigRequest,
|
||||
type UpdateLLMPreferencesRequest,
|
||||
updateLLMConfigRequest,
|
||||
updateLLMConfigResponse,
|
||||
updateLLMPreferencesRequest,
|
||||
updateLLMPreferencesResponse,
|
||||
} from "@/contracts/types/llm-config.types";
|
||||
import { ValidationError } from "../error";
|
||||
import { baseApiService } from "./base-api.service";
|
||||
|
||||
class LLMConfigApiService {
|
||||
/**
|
||||
* Get all global LLM configurations available to all users
|
||||
*/
|
||||
getGlobalLLMConfigs = async () => {
|
||||
return baseApiService.get(`/api/v1/global-llm-configs`, getGlobalLLMConfigsResponse);
|
||||
};
|
||||
}
|
||||
|
||||
export const llmConfigApiService = new LLMConfigApiService();
|
||||
Loading…
Add table
Add a link
Reference in a new issue