mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-10 17:00:11 +01:00
[FEAT] Github repo loader bug fix (#1558)
* fix project names with special characters for github repo data connector * linting
This commit is contained in:
parent
3f78ef413b
commit
4324a8bb4f
@ -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 = [
|
|||||||
];
|
];
|
||||||
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",
|
||||||
|
Loading…
Reference in New Issue
Block a user