Updated supported file formats

This commit is contained in:
jknapp 2025-02-17 09:50:51 -08:00
parent 743b56f329
commit 8bd9013c18
2 changed files with 7 additions and 3 deletions

View File

@ -15,15 +15,19 @@ A Python utility to create a knowledge base from a Git repository by importing f
The utility processes the following file types:
- Text files (`.txt`)
- Markdown files (`.md`)
- Markdown files (`.md`)
- Python files (`.py`)
- JavaScript files (`.js`)
- TypeScript files (`.ts`)
- TypeScript React files (`.tsx`)
- HTML files (`.html`)
- CSS files (`.css`)
- JSON files (`.json`)
- YAML files (`.yaml`, `.yml`)
- Shell scripts (`.sh`)
- Batch files (`.bat`)
- Jinja2 templates (`.j2`)
- Template files (`.tpl`)
- Dockerfiles
- LICENSE files
@ -84,4 +88,4 @@ This project is licensed under the terms of the MIT [LICENSE](LICENSE).
## Contributing
Feel free to open issues or submit pull requests to improve this tool.
Feel free to open issues or submit pull requests to improve this tool.

View File

@ -33,7 +33,7 @@ def create_knowledge_base_from_repo(token, base_url, repo_path, kb_name, kb_purp
print(f"Created knowledge base with ID: {kb_id}")
# 2. Upload files and add them to knowledge base
file_types = ['*.txt', '*.md', '*.py', '*.js', '*.html', '*.css', '*.json', '*.yaml', '*.yml', '*.sh', '*.bat', 'Dockerfile', 'LICENSE']
file_types = ['*.txt', '*.md', '*.py', '*.js', '*.html', '*.css', '*.json', '*.yaml', '*.yml', '*.sh', '*.bat', 'Dockerfile', 'LICENSE', '*.tsx', '*.j2', '*.tpl', '*.ts' ]
files_processed = 0
for file_pattern in file_types: