mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
fixes #2161, remove v1 validation requirement for openai api url
This commit is contained in:
@ -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),
|
||||
|
||||
@ -14,8 +14,8 @@ export const openai = () => {
|
||||
|
||||
if (baseURL) {
|
||||
return new OpenAI({
|
||||
baseURL,
|
||||
apiKey,
|
||||
baseURL,
|
||||
dangerouslyAllowBrowser: true,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user