XKCD: Create XKCD comic generator by christolis · Pull Request #1404 · Together-Java/TJ-Bot

@christolis

Use RAG with ChatGPT to store all XKCD comics and display the correct one
based on the chat history.

There is also the possibility to specify your own XKCD if you wish.

Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>

@christolis added enhancement

New feature or request

new command

Add a new command or group of commands to the bot

java

Pull requests that update java code

labels

Jan 31, 2026

Zabuzard

Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>
Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>
    - ChatGptService: Refrain from polluting it with XKCD related calls,

    - ChatGptService: provide JavaDocs to the methods that don't have one,

    - ChatGptService: remove unused sendWebPrompt method

    - XkcdCommand and XkcdRetriever: Refactor code into functions for
      readability.

Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>
Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>

tj-wazei

tj-wazei

@christolis

Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>

Zabuzard

tj-wazei

@christolis

  - refactor(XkcdRetriever): rename to XkcdService

  - doc(ChatGptService): clarify the meaning of RAG and vector store

  - XkcdService: improve fetchAllXkcdPosts method

  - XkcdCommand: do not allow more than 40KB of chat messages

Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>