[FEAT] Github repo loader bug fix (#1558)

* fix project names with special characters for github repo data connector

* linting
This commit is contained in:
Sean Hatfield 2024-05-29 02:01:29 -07:00 committed by GitHub
parent 3f78ef413b
commit 4324a8bb4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View File

@ -14,7 +14,11 @@ class RepoLoader {
#validGithubUrl() {
const UrlPattern = require("url-pattern");
const pattern = new UrlPattern(
"https\\://github.com/(:author)/(:project(*))"
"https\\://github.com/(:author)/(:project(*))",
{
// fixes project names with special characters (.github)
segmentValueCharset: "a-zA-Z0-9-._~%/+",
}
);
const match = pattern.match(this.repo);
if (!match) return false;

View File

@ -10,7 +10,12 @@ export const DISABLED_PROVIDERS = [
];
const PROVIDER_DEFAULT_MODELS = {
openai: [],
gemini: ["gemini-pro","gemini-1.0-pro", "gemini-1.5-pro-latest", "gemini-1.5-flash-latest"],
gemini: [
"gemini-pro",
"gemini-1.0-pro",
"gemini-1.5-pro-latest",
"gemini-1.5-flash-latest",
],
anthropic: [
"claude-instant-1.2",
"claude-2.0",