Skip to content
Snippets Groups Projects
Unverified Commit 4324a8bb authored by Sean Hatfield's avatar Sean Hatfield Committed by GitHub
Browse files

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

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

* linting
parent 3f78ef41
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,11 @@ class RepoLoader { ...@@ -14,7 +14,11 @@ class RepoLoader {
#validGithubUrl() { #validGithubUrl() {
const UrlPattern = require("url-pattern"); const UrlPattern = require("url-pattern");
const pattern = new UrlPattern( 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); const match = pattern.match(this.repo);
if (!match) return false; if (!match) return false;
......
...@@ -10,7 +10,12 @@ export const DISABLED_PROVIDERS = [ ...@@ -10,7 +10,12 @@ export const DISABLED_PROVIDERS = [
]; ];
const PROVIDER_DEFAULT_MODELS = { const PROVIDER_DEFAULT_MODELS = {
openai: [], 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: [ anthropic: [
"claude-instant-1.2", "claude-instant-1.2",
"claude-2.0", "claude-2.0",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment