github-actions
585638c457
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
57973cf606
Merge branch 'main' of https://github.com/Kav-K/GPT3Discord
2 years ago
Kaveen Kumarasinghe
6bff3b2cb5
Stabilize pinecone conversations
2 years ago
Rene Teigen
b74e0bf80e
Comment changes
2 years ago
Rene Teigen
7ecc56f0ae
Made the json parsin more robust and fixed bugs
2 years ago
Rene Teigen
cab2c184b6
Fix some directory traversal and smooth out behavior if file is not found
2 years ago
Rene Teigen
fbdc03b8dd
Enable json openers with overrides
2 years ago
github-actions
31df519cf5
Format Python code with psf/black push
2 years ago
Rene Teigen
07849ca42e
Slight refactor
2 years ago
Rene Teigen
5504ea2802
Fix cases where the user doesn't exist in the guild
...
Extra: add sqlite files to gitignore
2 years ago
Rene Teigen
67546d0705
Cleanup after merge
2 years ago
Rene Teigen
33eb5f4d76
Merge remote-tracking branch 'origin/main' into ping-to-name
2 years ago
Rene Teigen
cff7d09013
Fix mention escaping in conversations due to non-ascii removal
2 years ago
Rene Teigen
a46528ba90
Add escape on mentions
2 years ago
Rene Teigen
d93a1db51f
Shorten the replace function
2 years ago
Rene Teigen
e6bba27761
edit on_message_edit
2 years ago
Rene Teigen
f690821599
Replace user mentions with the nickname in prompt and output
2 years ago
github-actions
40ddf5a399
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
cf2dcd84f0
housekeeping, bugfixes
2 years ago
Kaveen Kumarasinghe
571d65fd37
revert auto-terminate change, bump version
2 years ago
github-actions
7c3b652a2a
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
a7b5d84a33
Persistent moderations
2 years ago
Kaveen Kumarasinghe
b2a923b064
auto terminate ask()
2 years ago
Kaveen Kumarasinghe
7de071dbfd
remove emoji before pinecone properly
2 years ago
github-actions
b47d52f217
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
48c9092558
keyword some stuff
2 years ago
Kaveen Kumarasinghe
051fc3a2ff
remove api key prints
2 years ago
Kaveen Kumarasinghe
cfb7eb0903
Multi tenancy api key support
2 years ago
Kaveen Kumarasinghe
0b2d4c95b7
fix bugs with conversations, some slight improvements
2 years ago
github-actions
99e1e3b11d
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
a6ded5ab81
fix opener file loading
2 years ago
Justin McPherson
d1d1b062f2
Merge branch 'main' into feat/docker-env
2 years ago
Justin McPherson
105afa0354
non docker case
2 years ago
github-actions
7f1a8e30f8
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
720fad0ee7
permanent memory with pinecone ready for alpha
2 years ago
Kaveen Kumarasinghe
a8b209c212
draft
2 years ago
Kaveen Kumarasinghe
fe54b250f6
fix img prompt optimizer redo bug
2 years ago
github-actions
ab553a0dba
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
189975a3f9
fix bug with message edits
2 years ago
Kaveen Kumarasinghe
7e72e9c71b
fix awaiting response already removed
2 years ago
github-actions
f4f53cf3cf
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
79c44fb0a0
Merge branch 'main' into rekey-conversation
...
Signed-off-by: Kaveen Kumarasinghe <k5kumara@uwaterloo.ca>
2 years ago
Rene Teigen
d3d15e767f
Block further responses until current is finished in threads
...
Fixed user not being correctly removed from awaiting responses on api error
Changed history username to server nickname
2 years ago
github-actions
903c91497d
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
9896051a7b
fine tune moderations a bit, fix Redo
2 years ago
Rene Teigen
566484febf
Fix conversation limit not being able to close thread
2 years ago
Rene Teigen
55f0db7f8b
Changed more name handling
2 years ago
Rene Teigen
36a9480506
Changed the ways names are added to the history
...
Changed the starters to pay more attention to the names of the chatters
2 years ago
Rene Teigen
c0e0d8ba8b
Changed conversations to be keyed by thread
...
The one starting it is the thread owner
Can only own one thread but can converse in multiple
Added a check dmchannel for the message edit moderation
Gave an error when opening a conversation then ending it
2 years ago
github-actions
7fb849de88
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
369c836a72
AI Moderation!
2 years ago
github-actions
db7c400ca4
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
3775432aae
Merge pull request #58 from Hikari-Haru/autocomplete
...
Autocomplete and changed the way opener files are loaded to use a folder instead
2 years ago
Rene Teigen
ae64bc9fa2
Fixed opener_file not being able to be used alone
2 years ago
Kaveen Kumarasinghe
04d1a06a9e
Merge pull request #60 from Hikari-Haru/bigger-images
...
Changed the image resizing to go by the guild filesize limit
2 years ago
github-actions
4a39685e45
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
b31bfbe26d
Merge pull request #55 from Hikari-Haru/ask-parameters
...
Added passthrough of gpt3 parameters to /ask
2 years ago
Rene Teigen
e0150c526d
Fix ctx passthrough with draw button
2 years ago
github-actions
2c21d5da1c
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
962cb3429c
add some convo safety checks
2 years ago
Rene Teigen
68a20dcc50
Changed the image resizing to go by the guild filesize limit
...
Since boosted servers have higher limits, even for bots
2 years ago
Rene Teigen
11ae8de8e0
Add a response if you're not in a conversation
2 years ago
Rene Teigen
db9dd047a9
Changed how the message type is checked end_conversation
2 years ago
Rene Teigen
f93e9c1bbf
Implement /gpt end
2 years ago
Rene Teigen
f8d3dd0ffd
Added os specific separator like in gpt3discord.py
2 years ago
Rene Teigen
581ec17643
Wrong opener_file description
2 years ago
Rene Teigen
6cfd2838a5
Added autocompleters to settings and opener files
...
Settings now gets current keys so manual updating of choices isn't required
Changed the way opener files are added to the conversation
Using an opener file also enables minimal starter
Added some example opener files
2 years ago
Justin McPherson
ef40933066
Merge branch 'main' into feat/docker-env
2 years ago
github-actions
d225b81aac
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
663fda421c
Make recurring file operations all async, add custom opener file feature
2 years ago
Kaveen Kumarasinghe
6cea6da6fe
Proper error messages on an API error
2 years ago
Rene Teigen
ddc23e7c10
Added some print to send_request and fixed the top_p description
2 years ago
Hikari Haru
9e4460c009
Added basic passthrough to /ask
...
Update readme
2 years ago
Kaveen Kumarasinghe
cb54d60421
update readme
2 years ago
Kaveen Kumarasinghe
a68eeb5651
fix some merge issues
2 years ago
github-actions
ab3d0a6868
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
5218c445af
Merge branch 'main' into slashgroups-refactor
...
Signed-off-by: Kaveen Kumarasinghe <k5kumara@uwaterloo.ca>
2 years ago
github-actions
b06e038a4e
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
0adb5c0e38
fix welcome message
2 years ago
Kaveen Kumarasinghe
28d04d5753
update settings with new param
2 years ago
Kaveen Kumarasinghe
dcb90f57fa
typo
2 years ago
github-actions
42d733de61
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
53235e4e1d
Merge branch 'main' of https://github.com/Kav-K/GPT3Discord
2 years ago
Kaveen Kumarasinghe
7d116d2ef3
fix typos
2 years ago
github-actions
316dcbb023
Format Python code with psf/black push
2 years ago
Karl
f13bd6ea3f
Merge branch 'Kav-K:main' into KarlKennerley-GPT3Discord-Issue#34
2 years ago
Karl
a5f5b0d35d
Updated on_member_join function
2 years ago
Justin McPherson
ddbe356e2a
Changes to environment loading.
...
- Move Some environment loading code to EnvService.
- Attempt loading of env file from multiple locations & names
- Provide a path fetching + fallback function for reading
paths from environment vars.
- For Docker;
- Create /opt/gpt3discord/{etc,bin,shared}
- Copy .txt shared data into shared
- Copy main .py into bin
2 years ago
Rene Teigen
84798e6cb7
Forgot imgoptimize to optimize in help
2 years ago
Rene Teigen
46039b5a43
Change chat to ask, and change imgoptimize to optimize
2 years ago
Rene Teigen
4657d9d814
Merge branch 'main' into slashgroups-refactor
2 years ago
github-actions
fd01dede70
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
7327982f3c
Error on draw failure
2 years ago
github-actions
7401728fbe
Format Python code with psf/black push
2 years ago
Rene Teigen
6c56bfc729
Fix behavior in conversation
2 years ago
Rene Teigen
e062cc2597
Fix view message edits
2 years ago
Karl
f30c9f07e3
Changed welcome message to query GPT3 for new msg
...
Welcome messages are now generated by GPT3 or default to one stored in env variable if GPT3 in unavailable.
2 years ago
Rene Teigen
b48c68e868
A little cleanup and changed the "admin" slash group to "system"
...
So that it's hidden further down on the list
2 years ago
Rene Teigen
e5eeb035c1
Implemented slash command grouping and more ways to configure who can use what.
...
Refactored /g into /chat and /gpt-chat into /converse
Both have the grouping "gpt" so the full is /gpt chat, and /gpt converse
Added pycord-multicog to the project for easier slash grouping across cogs
Made the role check case insensitive and added some comments to the sample.env
Removed the rest of the discord.ext imports, it's not really used, ymmv
Removed another admin check i had missed in local-size
2 years ago
Kaveen Kumarasinghe
37f2c8c1b4
Make image operations completely async, fix the optimized text length, set best_of=2
2 years ago
github-actions
21a304a873
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
f68f669ef7
Don't change the conversation prompt's human name to the user's name if it contains invalid characters
2 years ago
github-actions
5a791889f0
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
ca8e6b0d66
Merge pull request #44 from rolanddeboer/main
...
Replace 'Human:' in prompt with actual username
2 years ago
github-actions
d0be447ee9
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
300a4306ad
Merge pull request #46 from Kav-K/private-thread
...
Private threads, opener, minimal context option, credit to @Hikari-Haru
2 years ago
Kaveen Kumarasinghe
cf65baf078
remove prints
2 years ago
Kaveen Kumarasinghe
5eb792cb7e
Fix initial convo-end not working
2 years ago
Roland de Boer
4ecf29935e
Merge branch 'Kav-K:main' into main
2 years ago
Roland de Boer
7ba231473a
Replace Human: in prompt with actual username
2 years ago
Karl
88abf2946d
Added on_member_join listener. Fixes issue #34 .
...
Added the on_member_join listener. A DM will be sent to the new member upon joining the server.
Fixes issue #34 .
2 years ago
Kaveen Kumarasinghe
6732c136b2
Merge pull request #35 from Hikari-Haru/main
...
Add gitignore and change role checks
2 years ago
Rene Teigen
e35f320a5e
Add private threads, minified starter and added option for opening
2 years ago
Kaveen Kumarasinghe
3b1f8424f3
Remove GPTie: pre-prompt for /g, show the prompt after /g is run
2 years ago
github-actions
a4436f235f
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
5561ff3b57
Allow for /g to be used while in a conversation independently by the same user without conflicts
2 years ago
Hikari Haru
39c193adfa
Update gpt_3_commands_and_converser.py
...
Remove settings option
2 years ago
Rene Teigen
3ddb1056c3
Change way that roles are checked and some formatting
2 years ago
github-actions
0a60d7e2b0
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
39e8a61dc7
Merge branch 'main' of https://github.com/Kav-K/GPT3Discord
2 years ago
Kaveen Kumarasinghe
60bda11c25
Add clearer message for when a rate limit might've occured, clear awaiting_responses
2 years ago
github-actions
2fc67fc13b
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
fb5b1f1e93
SLASH COMMANDSgit status! Major Overhaul
2 years ago
github-actions
d928f32661
Format Python code with psf/black push
2 years ago
Cooper Lees
57e863167d
Merge branch 'Kav-K:main' into main
2 years ago
Cooper Ry Lees
d6885b3c35
Add Dockerfile + concept of a DATA_DIR
...
- Add a Dockerfile so people can run this bot in a docker container
- Stuck with recommendation of running with python3.9 for now
- Will later test with 3.11 + supply fixes if I get this working ...
- Added a DATA_DIR env param to use to choose the directory to write data we want persistent across docker container restarts to be written to
- We default to CWD like the code does today - we just explicitly pass it to functions / classes
Test:
- `docker build -t gpt3discord .`
```
crl-m1:GPT3Discord cooper$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
gpt3discord latest 6d2832af2450 69 seconds ago 356MB
```
- Try run it ... I would guess if I had correct tokens things would work ...
- To do so I plan to bind mount over /bin/.env on my docker container when I run this ...
```
crl-m1:GPT3Discord cooper$ docker run gpt3discord
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
Downloading: 100%|██████████| 1.04M/1.04M [00:02<00:00, 516kB/s]
Downloading: 100%|██████████| 456k/456k [00:01<00:00, 319kB/s]
Downloading: 100%|██████████| 1.36M/1.36M [00:03<00:00, 443kB/s]
Downloading: 100%|██████████| 665/665 [00:00<00:00, 740kB/s]
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/discord/http.py", line 413, in static_login
data = await self.request(Route("GET", "/users/@me"))
File "/usr/local/lib/python3.9/site-packages/discord/http.py", line 366, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/bin/gpt3discord", line 79, in <module>
asyncio.get_event_loop().run_until_complete(main())
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/bin/gpt3discord", line 63, in main
await bot.start(os.getenv("DISCORD_TOKEN"))
File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 658, in start
await self.login(token)
File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 514, in login
data = await self.http.static_login(token.strip())
File "/usr/local/lib/python3.9/site-packages/discord/http.py", line 417, in static_login
raise LoginFailure("Improper token has been passed.") from exc
discord.errors.LoginFailure: Improper token has been passed.
Wrote PID to file the file bot.pid
The debug channel and guild IDs are 755420092027633774 and 907974109084942396
Improper token has been passed.
Removing PID file
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0xffff721a2dc0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0xffff718fe0a0>, 170230.336548951)]']
connector: <aiohttp.connector.TCPConnector object at 0xffff721a2fd0>
```
2 years ago
Kaveen Kumarasinghe
94e76093af
Update help text
2 years ago
github-actions
ec38feaa36
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
35df0a192c
Merge branch 'main' of https://github.com/Kav-K/GPT3Discord
2 years ago
Kaveen Kumarasinghe
193a967d41
REVAMP ASYNC, fully working now, massively improve immage prompt optimizer
2 years ago
github-actions
7f98fa446d
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
b3fc6aa503
Get rid of extraneous text in imgoptimizer, auto-terminate the prompt if the user doesn't
2 years ago
github-actions
370bf2924c
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
7b82d9fbe8
Merge branch 'main' of https://github.com/Kav-K/GPT3Discord
2 years ago
Kaveen Kumarasinghe
051131e42f
remove unneccessary print
2 years ago
github-actions
2fe2302fc8
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
777a11c997
fix auto-expire retry and vary buttons
2 years ago
Kaveen Kumarasinghe
cdc6e70adb
Fix tempfile giving PermissionError on windows
2 years ago
Kaveen Kumarasinghe
4de4ab3f6e
bug squash!
2 years ago
Kaveen Kumarasinghe
f360741ad2
fix bugs
2 years ago
Kaveen Kumarasinghe
1f96dda52a
Merge branch 'main' of https://github.com/Kav-K/GPT3Discord
2 years ago
Kaveen Kumarasinghe
510f294c76
make bot fully async!
2 years ago
github-actions
24dce18052
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
3ea5f544e8
Fix bugs and add end conversation button to convo messages
2 years ago
github-actions
ffa23155c0
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
96c69c417f
fix bugs
2 years ago
Kaveen Kumarasinghe
4f8d4afd6b
Merge branch 'main' of https://github.com/Kav-K/GPT3Discord
2 years ago
Kaveen Kumarasinghe
24cd5011c4
get rid of small error thing
2 years ago
github-actions
0ed400a505
Format Python code with psf/black push
2 years ago
Kaveen Kumarasinghe
2a576c07e4
Recursive message summarizationgit add *git add *! Infinite chatgit add *git add *
2 years ago