From 3799f70470eb9720a175bff81946b590ac27fc39 Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Tue, 28 May 2024 20:06:08 -0700 Subject: [PATCH 1/2] fix project names with special characters for github repo data connector --- collector/utils/extensions/GithubRepo/RepoLoader/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/collector/utils/extensions/GithubRepo/RepoLoader/index.js b/collector/utils/extensions/GithubRepo/RepoLoader/index.js index dbe26fa29b0..c842f621b5b 100644 --- a/collector/utils/extensions/GithubRepo/RepoLoader/index.js +++ b/collector/utils/extensions/GithubRepo/RepoLoader/index.js @@ -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; From 5e2b84ab875edd027062c6dfdf66447e56be6f3e Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Tue, 28 May 2024 20:08:03 -0700 Subject: [PATCH 2/2] linting --- frontend/src/hooks/useGetProvidersModels.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/hooks/useGetProvidersModels.js b/frontend/src/hooks/useGetProvidersModels.js index d61d4c36d6a..e0a276993dc 100644 --- a/frontend/src/hooks/useGetProvidersModels.js +++ b/frontend/src/hooks/useGetProvidersModels.js @@ -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",