53ed068519
Add support of reply and do not get borred if prev message is borred. Manage memory.
2024-03-16 23:55:29 +01:00
0c23da7c9e
Changes.
2024-03-16 13:44:46 +01:00
39d7c48ee3
Remove some debug output.
2023-12-02 22:36:48 +01:00
c010603178
Fix and remove some tests, make openai calls cachable in a file.
2023-12-02 22:36:00 +01:00
Fjerkroa Auto
7bcadecb17
Solve new API thing differently.
2023-11-15 10:23:38 +01:00
Fjerkroa Auto
a2c7aec1e3
Merge branch 'master' of stage.fjerkroa.no:Fjerkroa/discord_bot
2023-11-14 10:27:29 +01:00
Fjerkroa Auto
488a8ef174
Support new openai API.
2023-11-14 10:27:03 +01:00
924daf134f
Improve exponantial back off on leanardo drawing a bit, and log the sleeps.
2023-08-22 11:30:30 +02:00
95bc6ce041
Add possibility to set retry-model, if AI request failes because of limits. Improve error handling in leanardo AI drawing.
2023-08-22 11:05:17 +02:00
17386af950
Fix channel names in answers on history.
2023-08-21 16:18:37 +02:00
Fjerkroa Auto
96ff52ef8a
Do not start bot with a message in chat.
2023-08-21 14:09:56 +02:00
Fjerkroa Auto
93fb2ccc5c
Improve chat-channel management and do not historise welcome question.
2023-08-21 13:58:00 +02:00
8c718ad272
Do not historise the boreness question.
2023-08-21 13:38:43 +02:00
67f8339cd6
Add boreness thread, the bot get borred with time and say something, even if nobody speak with him.
2023-08-21 13:29:59 +02:00
9d1d99ac50
Try to improve the auto translation.
2023-08-21 13:28:39 +02:00
Fjerkroa Auto
8a5cef4deb
Add log output, to see which drawing enginge was used.
2023-08-19 21:23:41 +02:00
4ec20f1b26
Add possibility to use Leonardo.ai for image generation and improve it a bit.
2023-08-19 16:04:21 +02:00
e237800348
Support Leonardo.ai to generate images.
2023-08-19 14:33:04 +02:00
771d965e8c
Fix user names in messages.
2023-08-18 20:32:11 +02:00
7c52896ad9
Switch from PyTOML to tomlkit.
2023-07-11 14:47:02 +02:00
6d9fa0e718
Added exponential backoff on ratelimit error, also print the token usage in output.
2023-07-11 14:47:02 +02:00
112f03a47a
Refactor and improve the code a bit
2023-04-13 18:57:37 +02:00
2508a12b44
Fix history limit handling.
2023-04-13 18:36:06 +02:00
79e95ab06c
Fix issue with last refactoring
2023-04-13 16:16:31 +02:00
b0f2f2f6e1
Refactor discord_bot.py code a bit and improve comments
2023-04-13 16:09:00 +02:00
bcfe0e968f
Fix history reducing alghorithm
2023-04-13 12:58:55 +02:00
Fjerkroa Auto
92c6d8474b
Output staff and welcome channels found in log.
2023-04-12 23:39:17 +02:00
08311812e0
Fix staff and welcome channels
2023-04-12 22:58:53 +02:00
b3834681b2
Use get_channel_name function
2023-04-12 22:50:53 +02:00
6074aa4d91
Add some comment
2023-04-12 22:45:42 +02:00
0a9420d156
Fix sending staff messages
2023-04-12 22:45:11 +02:00
2ca528e211
Comment the code a bit
2023-04-12 22:32:24 +02:00
7c029038f6
Output the returned answer from ai to log
2023-04-12 20:18:14 +02:00
6b70292040
Support channel names with # in front.
2023-04-12 20:14:48 +02:00
c8ea88c4e7
Respect ignore-channels when send message
2023-04-12 20:02:32 +02:00
536930d426
Fix shrink history for short path case.
2023-04-12 19:59:27 +02:00
b1a38d5e86
Refactor respond function.
2023-04-12 19:56:25 +02:00
4cfb6c162e
Fix the DMChannel support
2023-04-12 19:38:20 +02:00
203ebe72c1
Accept JSON structure as channel name
2023-04-12 19:22:45 +02:00
b26b98611a
Make the JSON porse a bit more robust.
2023-04-12 19:19:20 +02:00
b1ece64874
Implement possibility to answer to a different channel
2023-04-12 17:56:31 +02:00
defe598651
Improve handling of wrong keys in response
2023-04-12 12:47:53 +02:00
77fe7a69d6
Make history messages per channel configurable
2023-04-12 12:23:41 +02:00
2db983c462
Improve history handling
...
- Try to keep at least 3 messages from each channel in the history
- Use post processed messages for the history, instead of the raw
messages from the openai API
2023-04-12 12:19:07 +02:00
79fc0d6cba
Do not return "'none'" from parse_maybe_json.
2023-04-10 15:43:46 +02:00
d29595136f
Output the final answer in the log
2023-04-10 14:41:57 +02:00
961e70f17e
See quotet 'none' and 'null' also as None answer.
2023-04-10 14:34:38 +02:00
9a411a3fed
Handle messages as direct, when bot is mentioned.
2023-04-10 13:50:35 +02:00
24ae6bcf32
Convert markdown links to just links.
2023-03-30 17:33:58 +02:00
9eda81d7eb
Improve parse_maybe_json.
2023-03-30 15:52:11 +02:00