Skip to content

Commit

Permalink
fixes #2161, remove v1 validation requirement for openai api url
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed Jan 17, 2025
1 parent a9656af commit 18cf814
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion apps/client/src/services/openai/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const openai = () => {

if (baseURL) {
return new OpenAI({
baseURL,
apiKey,
baseURL,
dangerouslyAllowBrowser: true,
});
}
Expand Down

0 comments on commit 18cf814

Please sign in to comment.