mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
purge logs, unused
This commit is contained in:
@@ -495,49 +495,6 @@ function Upload({
|
||||
},
|
||||
};
|
||||
});
|
||||
console.log(ingestor);
|
||||
};
|
||||
|
||||
const handleChange = (
|
||||
e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,
|
||||
) => {
|
||||
const { name, value } = e.target;
|
||||
|
||||
if (ingestor.type === 'reddit') {
|
||||
const redditConfig = ingestor.config as RedditIngestorConfig;
|
||||
setIngestor({
|
||||
...ingestor,
|
||||
config: {
|
||||
...redditConfig,
|
||||
[name]:
|
||||
name === 'search_queries'
|
||||
? value.split(',').map((item) => item.trim())
|
||||
: name === 'number_posts'
|
||||
? parseInt(value)
|
||||
: value,
|
||||
},
|
||||
});
|
||||
} else if (ingestor.type === 'github') {
|
||||
const githubConfig = ingestor.config as GithubIngestorConfig;
|
||||
setIngestor({
|
||||
...ingestor,
|
||||
config: {
|
||||
...githubConfig,
|
||||
[name]: value,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
const urlConfig = ingestor.config as
|
||||
| CrawlerIngestorConfig
|
||||
| UrlIngestorConfig;
|
||||
setIngestor({
|
||||
...ingestor,
|
||||
config: {
|
||||
...urlConfig,
|
||||
[name]: value,
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleIngestorTypeChange = (type: IngestorType) => {
|
||||
|
||||
Reference in New Issue
Block a user