-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment optimisation #261
Open
marco-emmanuel-noto
wants to merge
21
commits into
father-bot:main
Choose a base branch
from
marco-emmanuel-noto:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
8646cf4
* Changed Dockerfile to use Alpine!
marco-emmanuel-noto 1389818
Merge branch 'karfly:main' into main
marco-emmanuel-noto aa546cd
*Connected to remote mongodb instance
marco-emmanuel-noto e40b83b
* Added apk to install bash
marco-emmanuel-noto 727c047
* Changed docker-compose
marco-emmanuel-noto 5b9f7de
* Added start command to dockerfile
marco-emmanuel-noto aa152ab
* Changed config.py to use os module
marco-emmanuel-noto df5ebfa
* Moved allowed users to .env file
marco-emmanuel-noto 8e965cb
* Changed syntax
marco-emmanuel-noto a27ee67
* Changed again to lambda function
marco-emmanuel-noto b0b052d
* Changed way of loading env variables to make it work locally with c…
marco-emmanuel-noto 95c9a60
* Refactoring
marco-emmanuel-noto c902a9e
Update README.md
marco-emmanuel-noto a14c09a
Update README.md
marco-emmanuel-noto d7f2d31
Update README.md
marco-emmanuel-noto 16d9160
Update README.md
marco-emmanuel-noto 8ab7f80
Update README.md
marco-emmanuel-noto 2803f88
* Changed env variable name to match that of railway
marco-emmanuel-noto 6b65cf6
* Removed remote mongo url altogether
marco-emmanuel-noto 0b70476
Update README.md
marco-emmanuel-noto c5e09ce
Update README.md
marco-emmanuel-noto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -129,7 +129,6 @@ dmypy.json | |
.pyre/ | ||
|
||
# Custom | ||
config/config.yml | ||
config/config.env | ||
|
||
docker-compose.dev.yml | ||
|
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
FROM python:3.8-slim | ||
FROM python:3.8-alpine | ||
|
||
ENV PYTHONFAULTHANDLER=1 | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHONHASHSEED=random | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV PIP_NO_CACHE_DIR=off | ||
ENV PIP_DISABLE_PIP_VERSION_CHECK=on | ||
ENV PIP_DEFAULT_TIMEOUT=100 | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y python3 python3-pip python-dev build-essential python3-venv ffmpeg | ||
RUN apk add --no-cache python3-dev build-base libffi-dev openssl-dev ffmpeg | ||
RUN apk add --no-cache bash | ||
|
||
RUN mkdir -p /code | ||
ADD . /code | ||
WORKDIR /code | ||
|
||
RUN pip3 install -r requirements.txt | ||
|
||
CMD ["bash"] | ||
CMD ["python3", "bot/bot.py"] |
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 was deleted.
Oops, something went wrong.
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,10 @@ | ||
use_chatgpt_api: true | ||
new_dialog_timeout: 600 # new dialog starts after timeout (in seconds) | ||
return_n_generated_images: 1 | ||
n_chat_modes_per_page: 5 | ||
enable_message_streaming: true # if set, messages will be shown to user word-by-word | ||
|
||
# prices | ||
chatgpt_price_per_1000_tokens: 0.002 | ||
gpt_price_per_1000_tokens: 0.02 | ||
whisper_price_per_1_min: 0.006 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not have a default value. it should be
new_dialog_timeout = config_yaml.get("new_dialog_timeout", 600)