mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-10 20:35:17 +02:00
feat: add update LLM config request/response schemas
This commit is contained in:
parent
a8b994241d
commit
1c5fba952d
1 changed files with 23 additions and 0 deletions
|
|
@ -107,6 +107,27 @@ export const getLLMConfigRequest = llmConfig.pick({ id: true });
|
|||
|
||||
export const getLLMConfigResponse = llmConfig;
|
||||
|
||||
/**
|
||||
* Update LLM config
|
||||
*/
|
||||
export const updateLLMConfigRequest = z.object({
|
||||
id: z.number(),
|
||||
data: llmConfig
|
||||
.pick({
|
||||
name: true,
|
||||
provider: true,
|
||||
custom_provider: true,
|
||||
model_name: true,
|
||||
api_key: true,
|
||||
api_base: true,
|
||||
language: true,
|
||||
litellm_params: true,
|
||||
})
|
||||
.partial(),
|
||||
});
|
||||
|
||||
export const updateLLMConfigResponse = llmConfig;
|
||||
|
||||
export type LLMConfig = z.infer<typeof llmConfig>;
|
||||
export type LiteLLMProvider = z.infer<typeof liteLLMProviderEnum>;
|
||||
export type GlobalLLMConfig = z.infer<typeof globalLLMConfig>;
|
||||
|
|
@ -117,3 +138,5 @@ export type GetLLMConfigsRequest = z.infer<typeof getLLMConfigsRequest>;
|
|||
export type GetLLMConfigsResponse = z.infer<typeof getLLMConfigsResponse>;
|
||||
export type GetLLMConfigRequest = z.infer<typeof getLLMConfigRequest>;
|
||||
export type GetLLMConfigResponse = z.infer<typeof getLLMConfigResponse>;
|
||||
export type UpdateLLMConfigRequest = z.infer<typeof updateLLMConfigRequest>;
|
||||
export type UpdateLLMConfigResponse = z.infer<typeof updateLLMConfigResponse>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue