Commit Graph

65 Commits

Author SHA1 Message Date
0bf1baf341 Fix image handling and do not react to bots or unchanged messages. 2024-03-17 15:10:35 +01:00
29b0d6efca Add reaction on message edit. 2024-03-17 13:46:37 +01:00
1bff1c9719 Fix reaction handling. 2024-03-17 13:25:02 +01:00
73d9b9184d Add support for reactions with emojis. 2024-03-17 12:39:15 +01:00
3bdf9d03c6 Change the way, memory is logged. 2024-03-17 12:08:00 +01:00
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
8c718ad272 Do not historise the boreness question. 2023-08-21 13:38:43 +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
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
bcfe0e968f Fix history reducing alghorithm 2023-04-13 12:58:55 +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
536930d426 Fix shrink history for short path case. 2023-04-12 19:59:27 +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
585ecc17c6 Parse response values, when they are JSON. 2023-03-30 15:38:42 +02:00
93c5758e02 Some more fixes, reduce retries. 2023-03-29 19:53:45 +02:00
ddc44bb9da Improve JSON parsing. 2023-03-29 19:22:54 +02:00
7f3cb66043 Improve log output. 2023-03-29 17:27:40 +02:00
e6d13afcca Reduce timeouts, introduce ignore-channels, fix the fix functions. 2023-03-28 21:24:49 +02:00
a503ee405c Ignore short path on messages mentioning the bot directly. 2023-03-27 18:38:56 +02:00
2ee2b092d6 Save history on short patch. 2023-03-27 14:13:10 +02:00
Fjerkroa Auto
2cd66b55ee Try to fix the fix. 2023-03-24 19:14:28 +01:00
b82477fc83 Support saving history. 2023-03-24 18:27:30 +01:00
Fjerkroa Auto
8aab8e2ec8 Small fixes. 2023-03-24 18:01:57 +01:00
b3edc621f6 Add an optional fix layer to the answer. 2023-03-24 17:28:56 +01:00