feat: add llm-config API service with getGlobalLLMConfigs endpoint

This commit is contained in:
CREDO23 2025-12-09 09:04:29 +00:00
parent 66e0d31f68
commit cb8e4ab1b7

View 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();