Commit graph

48 commits

Author SHA1 Message Date
5672f174ec misc: Make params final
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
2024-12-15 19:40:36 +01:00
80f33b6dbc bot: Add logging on main end
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
To see if we reach main end.
2024-12-04 20:08:10 +01:00
ec7be3d5c1 bot: Add missing module for logback-classic
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
Needs to be manually added since it is a runtime dependency and is not
seen by the jlink plugin.
2024-11-29 20:55:43 +01:00
02c979fe31 misc: Fix formatting
Using IntelliJ formatting.
2024-11-29 00:49:16 +01:00
c861f7e595 bot: Set the logging level to INFO 2024-11-29 00:35:15 +01:00
610d60aafe bot: Fix for only handling mention or ref to own message 2024-11-29 00:09:45 +01:00
3aa27ef8ff bot: Fix double thread start
Double start will produce following exception:
> java.lang.IllegalThreadStateException: Already started
2024-11-28 23:13:27 +01:00
4f1292377e bot: Fix execution in new thread 2024-11-28 20:09:30 +01:00
034a5152df bot: Fix not performing the async processing
If I don't wait for the future the calls are not made.
Waiting for the response is kinda ugly though and blocks the
main thread.
This should be seen more as a quick fix.
Kinda WIP!
2024-11-27 23:43:01 +01:00
9fe5175f13 bot: Fix not using provided system message 2024-11-27 23:40:50 +01:00
ac14f7ad42 bot: Enable debug information in runtime
To have stacktraces with information about the code
line with the error.
2024-11-27 23:34:04 +01:00
2ab3c5e01d build: Package as jlink image 2024-11-27 21:05:05 +01:00
2e928da270 misc: Cleanup 2024-11-23 19:09:45 +01:00
e05f4d0f4b bot: Add configuration logic 2024-11-23 18:41:29 +01:00
e204a5069f bot: Start implementing message handling 2024-11-21 22:01:38 +01:00
9626ec4b81 bot: Add initial initiation
Required some code changes in the modules to be easy initialable.
2024-11-19 23:46:15 +01:00
355cd01ee3 bot: Add discord websocket constructor
To test the module boundries.
2024-11-12 17:26:39 +01:00
1d56ce0511 discord-ws: Restructure for usage with java module system 2024-11-12 17:12:04 +01:00
18ee28daee Remove old modules
Time for a new beginning :)
2024-10-31 18:37:08 +01:00
2a0c71ca0c bot: Switch to GPT-4o mini model
All checks were successful
ci/woodpecker/push/java/1 Pipeline was successful
ci/woodpecker/push/java/2 Pipeline was successful
ci/woodpecker/push/java/3 Pipeline was successful
ci/woodpecker/push/java/4 Pipeline was successful
ci/woodpecker/push/nodejs Pipeline was successful
ci/woodpecker/push/java/5 Pipeline was successful
ci/woodpecker/push/oci-image-cache-build Pipeline was successful
ci/woodpecker/push/oci-image-build/2 Pipeline was successful
ci/woodpecker/push/oci-image-build/1 Pipeline was successful
ci/woodpecker/push/oci-image-build/3 Pipeline was successful
ci/woodpecker/push/oci-image-build/4 Pipeline was successful
ci/woodpecker/push/oci-image-build/5 Pipeline was successful
ci/woodpecker/push/cleanup Pipeline was successful
It is newer, has a bigger context and is way cheaper.
2024-07-18 21:19:24 +02:00
d694ee0a11 bot: Add debug logging 2024-06-27 20:12:53 +02:00
f29ec8f5c2 bot: Reduce ChatGPTResponse object
All checks were successful
ci/woodpecker/push/java/1 Pipeline was successful
ci/woodpecker/push/java/2 Pipeline was successful
ci/woodpecker/push/java/3 Pipeline was successful
ci/woodpecker/push/java/4 Pipeline was successful
ci/woodpecker/push/java/5 Pipeline was successful
ci/woodpecker/push/nodejs Pipeline was successful
ci/woodpecker/push/oci-image-cache-build Pipeline was successful
ci/woodpecker/push/oci-image-build/1 Pipeline was successful
ci/woodpecker/push/oci-image-build/2 Pipeline was successful
ci/woodpecker/push/oci-image-build/3 Pipeline was successful
ci/woodpecker/push/oci-image-build/4 Pipeline was successful
ci/woodpecker/push/oci-image-build/5 Pipeline was successful
2024-03-02 16:09:53 +01:00
b77836effb misc: Make all variables final 2024-01-25 20:32:30 +01:00
e58980cea3 misc: Make classes final 2024-01-25 19:04:04 +01:00
ca95bb45cb misc: Reformat and optimise imports 2024-01-25 18:58:31 +01:00
ab48afd5ed db: Introduce interface to enable testability 2024-01-25 18:56:51 +01:00
b6e5aa6e23 bot: Set ignore on ChatGPTResponse de/serialisation of unknown fields
Some checks failed
ci/woodpecker/tag/java/1 Pipeline was successful
ci/woodpecker/tag/java/2 Pipeline was successful
ci/woodpecker/tag/java/3 Pipeline was successful
ci/woodpecker/tag/java/4 Pipeline was successful
ci/woodpecker/tag/nodejs Pipeline was successful
ci/woodpecker/tag/oci-image-build/1 Pipeline failed
ci/woodpecker/tag/oci-image-build/2 Pipeline failed
ci/woodpecker/tag/oci-image-build/3 Pipeline failed
ci/woodpecker/tag/oci-image-build/4 Pipeline failed
ci/woodpecker/push/java/1 Pipeline was successful
ci/woodpecker/push/java/2 Pipeline was successful
ci/woodpecker/push/java/3 Pipeline was successful
ci/woodpecker/push/java/4 Pipeline was successful
ci/woodpecker/push/nodejs Pipeline was successful
ci/woodpecker/push/oci-image-build/1 Pipeline failed
ci/woodpecker/push/oci-image-build/2 Pipeline failed
ci/woodpecker/push/oci-image-build/3 Pipeline failed
ci/woodpecker/push/oci-image-build/4 Pipeline failed
OpenAI added a "logprobs" field that broke the deserialization. We now
just ignore all new fields to prevent the bot from breaking in the near
future just because they add a new field.
2024-01-07 17:48:39 +01:00
bd3267da5b bot: Use constructor injection for the ObjectMapper
Some checks failed
ci/woodpecker/push/java/1 Pipeline was successful
ci/woodpecker/push/java/2 Pipeline was successful
ci/woodpecker/push/java/3 Pipeline was successful
ci/woodpecker/push/java/4 Pipeline was successful
ci/woodpecker/push/nodejs Pipeline was successful
ci/woodpecker/push/oci-image-build/1 Pipeline failed
ci/woodpecker/push/oci-image-build/2 Pipeline failed
ci/woodpecker/push/oci-image-build/3 Pipeline failed
ci/woodpecker/push/oci-image-build/4 Pipeline failed
2023-12-10 21:03:30 +01:00
aa041df240 bot: Refactor to use pattern matching for building the message context 2023-12-10 20:58:25 +01:00
79f448f340 bot: Remove differentiating between direct and reply request 2023-12-10 20:14:03 +01:00
c5b6e47da0 bot: Extract message type check into own method
Makes it easier to read.
2023-12-10 19:55:51 +01:00
1ce2658b55 bot: Add missing ChatGptResponse field
All checks were successful
ci/woodpecker/tag/java/1 Pipeline was successful
ci/woodpecker/tag/java/2 Pipeline was successful
ci/woodpecker/tag/java/3 Pipeline was successful
ci/woodpecker/tag/java/4 Pipeline was successful
ci/woodpecker/tag/nodejs Pipeline was successful
ci/woodpecker/tag/oci-image-build/1 Pipeline was successful
ci/woodpecker/tag/oci-image-build/2 Pipeline was successful
ci/woodpecker/tag/oci-image-build/3 Pipeline was successful
ci/woodpecker/tag/oci-image-build/4 Pipeline was successful
ci/woodpecker/push/java/1 Pipeline was successful
ci/woodpecker/push/java/2 Pipeline was successful
ci/woodpecker/push/java/3 Pipeline was successful
ci/woodpecker/push/java/4 Pipeline was successful
ci/woodpecker/push/nodejs Pipeline was successful
ci/woodpecker/push/oci-image-build/1 Pipeline was successful
ci/woodpecker/push/oci-image-build/2 Pipeline was successful
ci/woodpecker/push/oci-image-build/3 Pipeline was successful
ci/woodpecker/push/oci-image-build/4 Pipeline was successful
This field was newly introduced an broke the serialization.
I opted against using the ignore-unknown Jackson annotation to get
informed about model changes. It might be a interesting field...
This just a hobby project :)
2023-12-09 22:27:39 +01:00
f0731e6754 bot: Reduce MessageCacheSize to reduce memory usage
I don't care that much in this case about speed I just want it to host
it on as few resources as possible :)
2023-12-09 22:14:52 +01:00
1e57aaaeee misc: Disable preview-feature
All checks were successful
ci/woodpecker/push/java/1 Pipeline was successful
ci/woodpecker/push/java/2 Pipeline was successful
ci/woodpecker/push/java/3 Pipeline was successful
ci/woodpecker/push/java/4 Pipeline was successful
ci/woodpecker/push/nodejs Pipeline was successful
ci/woodpecker/push/oci-image-build/1 Pipeline was successful
ci/woodpecker/push/oci-image-build/2 Pipeline was successful
ci/woodpecker/push/oci-image-build/3 Pipeline was successful
ci/woodpecker/push/oci-image-build/4 Pipeline was successful
ci/woodpecker/push/oci-image-build/5 Pipeline was successful
ci/woodpecker/push/oci-image-build/6 Pipeline was successful
ci/woodpecker/push/oci-image-build/7 Pipeline was successful
ci/woodpecker/push/oci-image-build/8 Pipeline was successful
There is no need for the preview feature after the upgrade to JDK 21
to access virtual threads :)
2023-12-08 20:27:03 +01:00
95cb36d6ed Change command event logging to debug level
Reduce the log output in info mode.
2023-06-16 17:12:56 +02:00
2afe46f888 Add tokens slash command support on DMs 2023-06-16 17:09:35 +02:00
1beb7bea27 Change DMs to send as normal message and not as reply
This should give a better read experience.
2023-06-16 14:14:16 +02:00
c66f31948a Add support for the 16k context model for DMs 2023-06-16 14:00:02 +02:00
ce61216dd6 Simplify checking of the OpenAI response 2023-06-11 22:05:03 +02:00
4b60f59956 Add support to use chat hitory for context in private chats 2023-05-21 20:03:34 +02:00
9243b410ab Increase timeout for OpenAI API to 5 minutes
The API is very slow lately...
2023-05-21 19:05:33 +02:00
6d537db12e Move dependency version management from module to parent pom
This should simplify updating dependencies and reduce dependency
resolution overhead.
2023-05-21 19:04:20 +02:00
d160f01b52 Intorduce HikariCP for JDBC connection pooling 2023-05-21 18:48:45 +02:00
f5e40e324d Fix to reply if no response was provided 2023-05-20 20:37:10 +02:00
5459cf1dd1 Refactor exception handling while handling events 2023-05-20 20:34:46 +02:00
3641b01162 Refactor unnecessary assignments 2023-05-20 20:28:31 +02:00
f457c23301 Increase OpenAI API timeout to 90 seconds
30 was to low.
2023-05-20 20:23:28 +02:00
b8b83baa72 Move into multi module project structure
Javalin and Javacord crash if running on same JVM but on different
threads for some reasons. This is should fix it :D
2023-05-16 01:50:56 +02:00