-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
889bfb6
commit af18333
Showing
12 changed files
with
791 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: docs | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- uses: actions/cache@v3 | ||
with: | ||
key: ${{ github.ref }} | ||
path: .cache | ||
- run: pip install mkdocs-macros-plugin | ||
- run: pip install mkdocs-material | ||
- run: pip install mkdocstrings[python] | ||
- run: pip install black | ||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: wheels | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- release | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build_sdist: | ||
name: Build SDist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Build SDist | ||
run: pipx run build --sdist | ||
|
||
- name: Check metadata | ||
run: pipx run twine check dist/* | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
|
||
build_wheels: | ||
name: Wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- run: python3 -m pip install --upgrade build && python3 -m build | ||
|
||
- name: Verify clean directory | ||
run: git diff --exit-code | ||
shell: bash | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: wheelhouse/*.whl | ||
|
||
|
||
upload_all: | ||
name: Upload if release | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
verbose: true | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
build/ | ||
dist/ | ||
_build/ | ||
_generate/ | ||
*.so | ||
*.py[cod] | ||
*.egg-info | ||
*env* | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# vscode | ||
.vscode | ||
|
||
# custom | ||
.idea | ||
_docs | ||
_examples | ||
src/.idea | ||
mtests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# AskCode | ||
|
||
Ask questions to your code base using the power of LLMs. | ||
|
||
# Installation | ||
|
||
```shell | ||
pip install https://github.com/abdeladim-s/askcode | ||
``` | ||
|
||
# Usage | ||
|
||
```shell | ||
askcode --help | ||
|
||
NAME | ||
askcode - Chat with your code base with the power of LLMs. | ||
|
||
SYNOPSIS | ||
askcode <flags> | ||
|
||
DESCRIPTION | ||
Chat with your code base with the power of LLMs. | ||
|
||
FLAGS | ||
-c, --codebase_path=CODEBASE_PATH | ||
Type: str | ||
Default: '.' | ||
path to your codebase | ||
--language=LANGUAGE | ||
Type: str | ||
Default: 'python' | ||
programming language ['python', 'javascript'] at the moment | ||
-p, --parser_threshold=PARSER_THRESHOLD | ||
Type: int | ||
Default: 0 | ||
minimum lines needed to activate parsing (0 by default). | ||
--text_splitter_chunk_size=TEXT_SPLITTER_CHUNK_SIZE | ||
Type: int | ||
Default: 256 | ||
Maximum size of chunks to return | ||
--text_splitter_chunk_overlap=TEXT_SPLITTER_CHUNK_OVERLAP | ||
Type: int | ||
Default: 50 | ||
Overlap in characters between chunks | ||
--use_HF=USE_HF | ||
Type: bool | ||
Default: True | ||
use hugging face models, if False OpenAI models will be used | ||
--llm_model=LLM_MODEL | ||
Type: str | ||
Default: 'TheBloke/CodeLlama-7B-... | ||
Large language model name (HF model name or OpenAI model) | ||
-e, --embeddings_model=EMBEDDINGS_MODEL | ||
Type: str | ||
Default: 'sentence-... | ||
Embeddings model (HF model name or OpenAI model) | ||
--retriever_search_type=RETRIEVER_SEARCH_TYPE | ||
Type: str | ||
Default: 'mmr' | ||
Defines the type of search that the Retriever should perform. Can be "similarity" (default), "mmr", or "similarity_score_threshold". | ||
--retriever_k=RETRIEVER_K | ||
Type: int | ||
Default: 4 | ||
Amount of documents to return (Default: 4) | ||
-m, --max_new_tokens=MAX_NEW_TOKENS | ||
Type: int | ||
Default: 50 | ||
Maximum tokens to generate | ||
--temperature=TEMPERATURE | ||
Type: float | ||
Default: 0.1 | ||
sampling temperature | ||
--top_p=TOP_P | ||
Type: float | ||
Default: 0.9 | ||
sampling top_p | ||
--repetition_penalty=REPETITION_PENALTY | ||
Type: float | ||
Default: 1.0 | ||
sampling repetition_penalty | ||
--use_autogptq=USE_AUTOGPTQ | ||
Type: bool | ||
Default: True | ||
Set it to True to use Quantized AutoGPTQ models | ||
``` | ||
# License | ||
MIT |
Empty file.
Oops, something went wrong.