Skip to content
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

DiscordAI 3.0.0 #46

Merged
merged 84 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
14c3913
3.0 todo list
A-Baji Jun 20, 2024
87b0745
fix checklist
A-Baji Jun 20, 2024
4f4d8b9
add modelizer submodule
A-Baji Jun 20, 2024
314fe22
install submodule in dockerfile
A-Baji Jun 20, 2024
05ff3ae
update checklist
A-Baji Jun 20, 2024
40fa779
point submodule to dev and pull changes
A-Baji Jun 22, 2024
e036bcb
remove follow job command
A-Baji Jun 22, 2024
529e350
update readme
A-Baji Jun 22, 2024
181e3e6
Merge pull request #36 from A-Baji/update-openai
A-Baji Jun 22, 2024
c46516e
pull modelizer changes to update DCE
A-Baji Jun 22, 2024
2ca5027
update readme
A-Baji Jun 22, 2024
e06ac8d
Merge pull request #37 from A-Baji/update-discordchatexporter
A-Baji Jun 22, 2024
8b25e45
update dev environment
A-Baji Jun 29, 2024
2765aea
update suported py vers
A-Baji Jun 29, 2024
c735e07
fix config
A-Baji Jun 29, 2024
deff340
fix docker
A-Baji Jun 29, 2024
12c1818
rework command line
A-Baji Jun 30, 2024
57f34e2
dynamic error str
A-Baji Jun 30, 2024
80686e8
entrypoint update
A-Baji Jun 30, 2024
209780c
update config key names
A-Baji Jun 30, 2024
845cab5
move set functions to modelizer
A-Baji Jul 1, 2024
2e8da78
udpate config command
A-Baji Jul 1, 2024
9f8778d
command_line init.py
A-Baji Jul 1, 2024
3635572
bump modelizer ver
A-Baji Jul 1, 2024
eed5b38
upgrade modelizer to 3.0.3
A-Baji Jul 1, 2024
4b25d92
package with py3.12
A-Baji Jul 1, 2024
b5da33d
unpin pyinstaller ver
A-Baji Jul 1, 2024
4ce1477
fix entrypoint
A-Baji Jul 1, 2024
909e3d9
modelizer v3.0.4
A-Baji Jul 1, 2024
51673b4
Merge pull request #38 from A-Baji/update-cli
A-Baji Jul 1, 2024
88b2873
bump modelizer submodule
A-Baji Jul 1, 2024
3ec7541
update template functions and cli help strs
A-Baji Jul 2, 2024
6f24c1c
update bot driver and cli commands
A-Baji Jul 2, 2024
4752639
add better_profanity hidden import
A-Baji Jul 2, 2024
ad39b45
collect data
A-Baji Jul 2, 2024
1f99439
revert to makedirs
A-Baji Jul 2, 2024
42d7735
Merge pull request #39 from A-Baji/update-bot
A-Baji Jul 2, 2024
b3dcbfc
update openai cog
A-Baji Jul 2, 2024
37fcaea
update imageai cog
A-Baji Jul 2, 2024
1e22343
update chatpgt cog
A-Baji Jul 3, 2024
67a9e77
update customai cog
A-Baji Jul 3, 2024
4d081dc
update template cog
A-Baji Jul 3, 2024
1083f9f
udpate error params
A-Baji Jul 3, 2024
99e6eae
unused import
A-Baji Jul 3, 2024
4a5a146
clean up code
A-Baji Jul 3, 2024
797dc69
fix
A-Baji Jul 3, 2024
8c0095a
command list
A-Baji Jul 3, 2024
2a9d580
Merge pull request #40 from A-Baji/update-cogs
A-Baji Jul 3, 2024
ecd43f6
tweaks
A-Baji Jul 4, 2024
a0e404c
Merge branch 'update-cogs' into dev
A-Baji Jul 4, 2024
7fb08de
test bot commands
A-Baji Jul 4, 2024
4e1ce26
test config
A-Baji Jul 4, 2024
64ca6bc
stuff
A-Baji Jul 5, 2024
ca84c6f
reuse command line tests from modelizer
A-Baji Jul 6, 2024
e67bdbf
test command_line
A-Baji Jul 9, 2024
f3f483f
bump modelizer ver
A-Baji Jul 9, 2024
b9787dd
update CI
A-Baji Jul 9, 2024
7a7885c
remove modelizer install
A-Baji Jul 9, 2024
e6545bb
update modelizer tests
A-Baji Jul 10, 2024
9cb1fa1
fix?
A-Baji Jul 10, 2024
db57f2c
???
A-Baji Jul 10, 2024
ff42c09
debug
A-Baji Jul 10, 2024
dd8b26d
save
A-Baji Jul 10, 2024
badbd2f
fix version
A-Baji Jul 10, 2024
9d347eb
debug
A-Baji Jul 10, 2024
4590f24
readme
A-Baji Jul 10, 2024
24bdecc
me dum
A-Baji Jul 10, 2024
29e7137
fix
A-Baji Jul 10, 2024
b9fc381
Merge pull request #42 from A-Baji/tests
A-Baji Jul 10, 2024
1b8a7b8
update modelizer
A-Baji Jul 11, 2024
a9d4e74
update template prompt
A-Baji Jul 11, 2024
766acff
udpate tests
A-Baji Jul 11, 2024
b0329b2
packaging oops
A-Baji Jul 11, 2024
ac39452
changelog
A-Baji Jul 11, 2024
bef22d8
update readme
A-Baji Jul 12, 2024
9f65be1
update customai
A-Baji Jul 12, 2024
731ac08
bump modelizer to 3.0.8
A-Baji Jul 12, 2024
91b23fe
capitalzartion
A-Baji Jul 12, 2024
d5b8649
update tests
A-Baji Jul 12, 2024
d05f9c3
Merge pull request #43 from A-Baji/documentation
A-Baji Jul 12, 2024
3a97197
Merge branch 'main' of https://github.com/A-Baji/discordAI into dev
A-Baji Jul 12, 2024
0a318e9
update cogs when running exe
A-Baji Jul 12, 2024
b7fd167
variable scope
A-Baji Jul 12, 2024
3cc2490
update ver
A-Baji Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[run]
omit =
*/bot/*

[report]
exclude_lines =
if __name__ == "__main__":
except KeyboardInterrupt:
42 changes: 27 additions & 15 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,31 @@ jobs:
fail-fast: false
matrix:
py_ver:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- uses: actions/setup-python@v4
with:
python-version: ${{matrix.py_ver}}
python-version: ${{ matrix.py_ver }}
- name: Install Package
run: pip install .
- name: Test Package
run: echo -e "none\nnone" | discordai -V
env:
PY_VER: ${{ matrix.py_ver }}
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
USERNAME: ${{ secrets.USERNAME }}
PYTHONUNBUFFERED: 1
run: |
touch .env.test
export VERSION=$(cat discordai/version.py | grep -oP '\d+\.\d+\.\d+')
docker compose -f docker-compose-test.yaml up --build --exit-code-from tests
release:
if: |
github.event_name == 'push' &&
Expand All @@ -41,11 +53,11 @@ jobs:
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{steps.version.outputs.discordai_version}}
release_name: Release ${{steps.version.outputs.discordai_version}}
body: Release ${{steps.version.outputs.discordai_version}}
tag_name: ${{ steps.version.outputs.discordai_version }}
release_name: Release ${{ steps.version.outputs.discordai_version }}
body: Release ${{ steps.version.outputs.discordai_version }}
draft: false
prerelease: false
package:
Expand All @@ -62,25 +74,25 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install Dependencies
run: pip install . pyinstaller==5.7
run: pip install . pyinstaller
# Package
- name: Windows CLI Package
if: ${{matrix.os == 'windows-latest'}}
if: ${{ matrix.os == 'windows-latest' }}
run: |
pyinstaller discordai/command_line.py --console --onefile --name=discordai --add-binary='discordai/bot/cogs;discordai/bot/cogs' --hidden-import=openai --hidden-import=tiktoken --collect-data=discordai_modelizer
pyinstaller discordai/command_line/command_line.py --console --onefile --name=discordai --add-binary='discordai/bot/cogs;discordai/bot/cogs' --hidden-import=openai --collect-data=discordai_modelizer
Compress-Archive -Path dist\*discordai* -DestinationPath discordai-windows.zip
- name: Mac CLI Package
if: ${{matrix.os == 'macos-latest'}}
if: ${{ matrix.os == 'macos-latest' }}
run: |
pyinstaller discordai/command_line.py --console --onefile --name=discordai --add-data='discordai/bot/cogs:discordai/bot/cogs' --hidden-import=openai --hidden-import=tiktoken --hidden-import=configparser --collect-data=discordai_modelizer --collect-data=aiohttp --collect-data=certifi
pyinstaller discordai/command_line/command_line.py --console --onefile --name=discordai --add-data='discordai/bot/cogs:discordai/bot/cogs' --hidden-import=openai --hidden-import=configparser --collect-data=discordai_modelizer --collect-data=aiohttp --collect-data=certifi
zip -j discordai-macos.zip dist/*discordai*
chmod +x dist/*discordai*
- name: Linux CLI Package
if: ${{matrix.os == 'ubuntu-latest'}}
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
pyinstaller discordai/command_line.py --console --onefile --name=discordai --add-binary='discordai/bot/cogs:discordai/bot/cogs' --hidden-import=openai --hidden-import=tiktoken --collect-data=discordai_modelizer
pyinstaller discordai/command_line/command_line.py --console --onefile --name=discordai --add-binary='discordai/bot/cogs:discordai/bot/cogs' --hidden-import=openai --collect-data=discordai_modelizer
zip -j discordai-linux.zip dist/*discordai*
chmod +x dist/*discordai*
# Upload
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ discordai/bot/cogs/*.py
!discordai/bot/cogs/chatgpt.py
!discordai/bot/cogs/sync.py
init.sh
/files/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -115,6 +116,7 @@ celerybeat.pid
*.sage.py

# Environments
/*.env*
.env
.venv
env/
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "discordAI-modelizer"]
path = discordAI-modelizer
url = https://github.com/A-Baji/discordAI-modelizer.git
branch = dev
29 changes: 27 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.

## [3.0.0] - 07-xx-2024

### Added

- support for python 3.12
- unit tests

### Changed

- updated modelizer to version [3.0.9](https://github.com/A-Baji/discordAI-modelizer/releases/tag/3.0.9)
- updated and pinned openai to version 1.35.5
- includes various updates to the included slash commands
- updated DiscordChatExporter to version 2.43.3
- refactor/optimization/general cleanup of code
- improved dev environment
- updated some cli args
- updated some cli help strings
- updated config handling

### Removed

- support for python 3.8
- token usage tracking for /chatgpt command

## [2.0.1] - 06-15-2023

### Changed
Expand All @@ -14,7 +38,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
### Added

- a changelog
- an openAI image generation command
- an OpenAI image generation command
- the gpt3.5 model to the openai command and made it the default
- a chatGPT command with chat history functionality
- custom emoji support for custom models.
Expand All @@ -26,7 +50,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and

### Changed

- made prompt bolding for custom model completions a discord command parameter
- made prompt bolding for custom model completions a Discord command parameter
- updated modelizer to version [2.0.0](https://github.com/A-Baji/discordAI-modelizer/releases/tag/2.0.0)

## [1.3.2] - 02-22-2023
Expand Down Expand Up @@ -82,6 +106,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and

- modified readme

[3.0.0]: https://github.com/A-Baji/discordAI/compare/2.0.1...3.0.0
[2.0.1]: https://github.com/A-Baji/discordAI/compare/1.3.2...2.0.1
[2.0.0]: https://github.com/A-Baji/discordAI/compare/1.3.2...2.0.0
[1.3.2]: https://github.com/A-Baji/discordAI/compare/1.3.1...1.3.2
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM python:3.11-alpine
ARG PY_VER
FROM python:${PY_VER}
WORKDIR /main
RUN apk update
RUN apk add git
COPY ./requirements.txt ./setup.py ./README.md /main/
COPY ./discordai /main/discordai
RUN pip3 install --upgrade pip
Expand Down
Loading
Loading