forked from iusztinpaul/hands-on-llms
-
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.
Feature/bot-7: Add chat history support to the financial bot (iusztin…
…paul#13) * feat: Add Makefile & GitHub Actions flow * fix: Typo * chore: Fix .env.example fileS * fix: Financial bot Makefile * feat: Adapt finbot Makefile. Fix finbot context bug. * fix: Sharing keys between chains * Add chat history support to the financial bot * chore: Add TODOs & Fix linting issues
- Loading branch information
1 parent
809d652
commit 60afa0d
Showing
16 changed files
with
229 additions
and
107 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,38 @@ | ||
name: pep8_financial_bot | ||
|
||
on: [push] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pep8-python: | ||
name: PEP8 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: 1.5.1 | ||
|
||
- name: Install packages | ||
working-directory: ./modules/financial_bot | ||
run: make install_only_dev | ||
|
||
- name: Run PEP8 linter | ||
working-directory: ./modules/financial_bot | ||
run: make lint_check | ||
|
||
- name: Run PEP8 format checker | ||
working-directory: ./modules/financial_bot | ||
run: make format_check |
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
File renamed without changes.
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,52 @@ | ||
### Install ### | ||
|
||
install: | ||
@echo "Installing financial bot..." | ||
|
||
poetry env use $(shell which python3.10) && \ | ||
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry install && \ | ||
poetry run pip install torch==2.0.1 | ||
|
||
install_dev: install | ||
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry install --only dev | ||
|
||
install_only_dev: | ||
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry install --only dev | ||
|
||
add: | ||
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry add $(package) | ||
|
||
add_dev: | ||
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry add --group dev $(package) | ||
|
||
|
||
# === Run === | ||
|
||
run: | ||
@echo "Running financial_bot..." | ||
|
||
poetry run python -m tools.run_chain | ||
|
||
|
||
### PEP 8 ### | ||
# Be sure to install the dev dependencies first # | ||
|
||
lint_check: | ||
@echo "Checking for linting issues..." | ||
|
||
poetry run ruff check . | ||
|
||
lint_fix: | ||
@echo "Fixing linting issues..." | ||
|
||
poetry run ruff check --fix . | ||
|
||
format_check: | ||
@echo "Checking for formatting issues..." | ||
|
||
poetry run black --check . | ||
|
||
format_fix: | ||
@echo "Formatting code..." | ||
|
||
poetry run black . |
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
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
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
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
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
Oops, something went wrong.