fixes #2161, remove v1 validation requirement for openai api url

This commit is contained in:
Amruth Pillai
2025-01-17 22:38:45 +01:00
parent a9656afbbf
commit 18cf814779
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ const formSchema = z.object({
baseURL: z
.string()
// eslint-disable-next-line lingui/no-unlocalized-strings
.regex(/https?:\/\/[^/]+\/?v1$/, "That doesn't look like a valid URL")
.regex(/^https?:\/\/[^/]+\/?$/, "That doesn't look like a valid URL")
.or(z.literal(""))
.default(""),
model: z.string().default(DEFAULT_MODEL),

View File

@ -14,8 +14,8 @@ export const openai = () => {
if (baseURL) {
return new OpenAI({
baseURL,
apiKey,
baseURL,
dangerouslyAllowBrowser: true,
});
}