fix formatting and lint errors

This commit is contained in:
Amruth Pillai
2025-01-30 17:57:14 +01:00
parent b21f1648c4
commit 92995d9c2b
5 changed files with 263 additions and 199 deletions

View File

@ -22,12 +22,12 @@ const formSchema = z.object({
apiKey: z
.string()
// eslint-disable-next-line lingui/no-unlocalized-strings
.min(1, "API key cannot be empty.") //allow api keys like hf-.. and gsk_..
.min(1, "API key cannot be empty.")
.default(""),
baseURL: z
.string()
// eslint-disable-next-line lingui/no-unlocalized-strings
.regex(/^https?:\/\/[^\s]+$/, "That doesn't look like a valid URL") //allow different openai compatible endpoints like https://api.groq.com/openai/v1 and https://api-inference.huggingface.co/v1/
.regex(/^https?:\/\/\S+$/, "That doesn't look like a valid URL")
.or(z.literal(""))
.default(""),
model: z.string().default(DEFAULT_MODEL),