mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-31 19:45:15 +02:00
feat: add get LLM configs request/response schemas
This commit is contained in:
parent
a4f0b21529
commit
c065824d02
1 changed files with 17 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
import { paginationQueryParams } from ".";
|
||||||
|
|
||||||
export const liteLLMProviderEnum = z.enum([
|
export const liteLLMProviderEnum = z.enum([
|
||||||
"OPENAI",
|
"OPENAI",
|
||||||
|
|
@ -85,9 +86,25 @@ export const createLLMConfigRequest = llmConfig.pick({
|
||||||
|
|
||||||
export const createLLMConfigResponse = llmConfig;
|
export const createLLMConfigResponse = llmConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get LLM configs
|
||||||
|
*/
|
||||||
|
export const getLLMConfigsRequest = z.object({
|
||||||
|
queryParams: paginationQueryParams
|
||||||
|
.pick({ skip: true, limit: true })
|
||||||
|
.extend({
|
||||||
|
search_space_id: z.number().or(z.string()),
|
||||||
|
})
|
||||||
|
.nullish(),
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getLLMConfigsResponse = z.array(llmConfig);
|
||||||
|
|
||||||
export type LLMConfig = z.infer<typeof llmConfig>;
|
export type LLMConfig = z.infer<typeof llmConfig>;
|
||||||
export type LiteLLMProvider = z.infer<typeof liteLLMProviderEnum>;
|
export type LiteLLMProvider = z.infer<typeof liteLLMProviderEnum>;
|
||||||
export type GlobalLLMConfig = z.infer<typeof globalLLMConfig>;
|
export type GlobalLLMConfig = z.infer<typeof globalLLMConfig>;
|
||||||
export type GetGlobalLLMConfigsResponse = z.infer<typeof getGlobalLLMConfigsResponse>;
|
export type GetGlobalLLMConfigsResponse = z.infer<typeof getGlobalLLMConfigsResponse>;
|
||||||
export type CreateLLMConfigRequest = z.infer<typeof createLLMConfigRequest>;
|
export type CreateLLMConfigRequest = z.infer<typeof createLLMConfigRequest>;
|
||||||
export type CreateLLMConfigResponse = z.infer<typeof createLLMConfigResponse>;
|
export type CreateLLMConfigResponse = z.infer<typeof createLLMConfigResponse>;
|
||||||
|
export type GetLLMConfigsRequest = z.infer<typeof getLLMConfigsRequest>;
|
||||||
|
export type GetLLMConfigsResponse = z.infer<typeof getLLMConfigsResponse>;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue