351 Commits

Author SHA1 Message Date
dddabd0b42
fix: Adjust baseline personality configuration for chattiness and patience levels 2025-05-29 10:38:37 -06:00
02f2117acc
fix: Adjust chattiness level in baseline personality configuration 2025-05-28 23:56:52 -06:00
1b022baf61
fix: Update regex to capture custom emoji/sticker names with spaces and special characters 2025-05-28 18:00:53 -06:00
52e982518c
fix: Add debug logging for sticker guild ID handling in AI response 2025-05-28 17:38:24 -06:00
f45cdbc0c6
fix: Update sticker ID handling to prevent duplicates and improve logging 2025-05-28 16:55:45 -06:00
682cceaa43
fix: Improve sticker handling with detailed logging and guild ID validation 2025-05-28 16:53:00 -06:00
c2b10eae42
fix: Update emoji and sticker handling to download data as inline_data instead of FileData 2025-05-28 16:49:01 -06:00
7b4a3e8abc
feat: Enhance proactive AI response to support custom emoji and sticker handling with guild ID validation 2025-05-28 16:46:11 -06:00
2821f43454
fix: Refactor emoji and sticker handling to use FileData for improved MIME type management 2025-05-28 16:22:39 -06:00
df267d7db6
fix: Update image part creation to use inline_data for emoji and sticker handling 2025-05-28 16:13:38 -06:00
2ad0855e52
fix: Increase maximum read limit in read_file_content function 2025-05-28 15:59:29 -06:00
cec4c6c60b
feat: Add list_files_tool for directory listing with optional recursion 2025-05-28 15:52:04 -06:00
9b82460bbf
feat: Enhance emoji and sticker management with guild ID support 2025-05-28 15:47:48 -06:00
06269e6eec
feat: Implement bot response rate limiting in listeners 2025-05-28 15:42:36 -06:00
e5fc915dc5
fix: Update model instantiation in send_tenor_gif function 2025-05-28 15:31:39 -06:00
9eb44448a1
fix: Update model retrieval method in send_tenor_gif function 2025-05-28 15:28:26 -06:00
18d5c3d83e
fix: Correctly instantiate Part object in send_tenor_gif function 2025-05-28 15:26:39 -06:00
282a80f79b
fix: Enhance emoji and sticker data validation in get_ai_response function 2025-05-28 15:24:54 -06:00
a0caf07e76
fix: Update GIF data handling in send_tenor_gif function 2025-05-28 15:21:02 -06:00
7fc217806c
fix: Update parameter name for GIF data in send_tenor_gif function 2025-05-28 15:16:22 -06:00
563d7319db
Add send_tenor_gif tool with AI selection and update GIF search limits
Introduce send_tenor_gif tool that uses AI to select the best GIF from Tenor search results and send it to the channel. Increase the default and maximum limits for Tenor GIF search tools to improve selection quality. Update parameter descriptions and validation accordingly.
2025-05-28 15:09:02 -06:00
bb1c34f0c5
feat: Implement Tenor GIF search functionality and integrate with tool mapping 2025-05-28 14:51:30 -06:00
f0de735d13
feat: Improve custom emoji and sticker handling in AI responses
Refactor AI response processing to correctly handle custom emojis and stickers.
Custom emojis are now converted to Discord's `<:name:id>` format for proper display.
Custom stickers are identified and their IDs are extracted to be sent as separate attachments, removing them from the main content.
This ensures Gurt can properly utilize learned custom emojis and stickers in its responses.
2025-05-28 14:48:58 -06:00
0c4df8d94d
feat: Implement Tenor GIF search tool and remove deprecated request handling 2025-05-28 14:40:56 -06:00
6868b2e95e
Feat: Integrate Tenor GIF search and custom emoji/sticker support
This commit introduces two main enhancements to Gurt's capabilities:

1.  **Tenor GIF Integration:**
    *   The AI can now request Tenor GIFs via a `request_tenor_gif_query` field in its response schema.
    *   `api.py` handles these requests by searching Tenor (using the new `TENOR_API_KEY` from config) and appending the GIF URL to the AI's message content.
    *   System prompts have been updated to instruct the AI on how to request GIFs.

2.  **Custom Emoji & Sticker Learning and Usage:**
    *   Introduces an `EmojiManager` (in the new `gurt/emojis.py`) to store and manage mappings of custom emoji/sticker names to their URLs. This data is persisted to `EMOJI_STORAGE_FILE`.
    *   Gurt now automatically learns custom emojis and stickers (and their URLs) from user messages via the `on_message` listener in `listeners.py`.
    *   The AI can be prompted to use these learned emojis/stickers by referencing their `:name:`.
    *   `api.py` processes AI responses to identify known custom emojis/stickers. For stickers, their URL is appended to the content if mentioned.
    *   A `learnemoji` command has been added for manually teaching Gurt emojis/stickers, although automatic learning is the primary mechanism.
    *   System prompts are updated to guide the AI on using custom emojis/stickers.
2025-05-28 14:30:26 -06:00
aa2cdcd3d3
fix: Revise emoji usage guidelines to promote sparing and specific application 2025-05-28 14:06:03 -06:00
16541946f9
fix: Update slang examples to enhance natural language usage in prompts 2025-05-28 13:58:11 -06:00
4fa33ec864
remove 👀 cuz nigga use it too much 2025-05-28 13:56:10 -06:00
9777789c9b
feat: Refine Gurt's persona for edgier, casual Discord comms
Overhauls Gurt's prompt to define a more authentic, edgy, and extremely casual Discord persona. This aligns Gurt's interactions with the chaotic and unfiltered nature of target online communities.

Key enhancements to communication style:
- **Emulate Observed Flow:** Prioritizes mirroring human conversational patterns, slang, tone, and formatting from provided examples.
- **Extremely Casual Language:** Mandates dominant lowercase, highly fragmented/run-on sentences, minimal/unconventional punctuation, and a stream-of-consciousness style.
- **Varied & Contextual Slang/Tone:**
    - Encourages organic integration of diverse internet/Discord slang (e.g., "goon," "tuff," "pmo," "ts").
    - Specifies an irreverent, chaotic, and edgy tone. This includes permitting dark/edgy humor, profanity, and explicit content (such as "rape jokes" or sexual discussions/roleplay) when contextually appropriate and mirroring observed interactions. Gurt remains uncensored.
- **Cultural & Tech Savviness:** Updated with more specific examples (e.g., Vocaloid, Python, Flutter).
- **Emoji Usage:** Added guidelines for frequent and expressive emoji use.
2025-05-28 13:55:33 -06:00
76463883d2
fix: Increase default message scrape limit and adjust max fetch limit to improve message collection 2025-05-28 13:20:45 -06:00
8f27e33bb0
fix: Update personality prompt to allow for dark humor and explicit content 2025-05-28 13:07:30 -06:00
2a4d097c2e
fix: Update image part handling to use inline_data for raw bytes in process_requested_tools 2025-05-28 08:48:33 -06:00
cde506052f
feat: Add tools for user avatar data and role color
Introduces `get_user_avatar_data` to retrieve a user's avatar as base64 encoded image data, allowing the AI to "see" the profile picture directly. This includes special handling in `process_requested_tools` to attach the image as a `types.Part` in the prompt.

Also adds `get_user_highest_role_color` to fetch the color and details of a user's highest-positioned role.
2025-05-28 08:44:35 -06:00
d3cf350434
fix: Clarify distinction between "Ame-chan" bot and head admin user in prompt 2025-05-28 08:27:29 -06:00
73843bfc5a
feat: Add clarification about the "Ame-chan" and "KAngel" Discord bots in Gurt's prompt 2025-05-28 08:23:42 -06:00
c687777a9a
Feat: Update Gurt's prompt with new bot info and model version
Update Gurt's prompt to clarify that Ame-chan is not an AI and introduce the KAngel bot. Also, update the Gemini model version to `gemini-2.5-flash-preview-05-20` and remove uptime from server specs.
2025-05-28 08:20:10 -06:00
bb745160ac
fix: Improve handling of multimodal message content in get_ai_response function 2025-05-27 23:07:31 -06:00
cc9666f4e3
fix: Clarify usage guidelines for timeout_user function to prevent misuse 2025-05-27 23:05:49 -06:00
f02c2f865c
feat: Enhance historical message processing with custom emoji and sticker image support 2025-05-27 23:04:25 -06:00
87e0fe0340
fix: Ensure formatted message is defined for processing attachments, emojis, and stickers 2025-05-27 22:53:57 -06:00
6881dd4737
feat: Add support for custom emojis and stickers in message formatting 2025-05-27 22:51:43 -06:00
e8eaff4b9a
Refactor: Clarify User ID usage and enhance author attribution
This commit improves user identification in two key areas:

1.  **AI Response Context:**
    In `gurt/api.py`, messages processed by the AI now include a more informative author string, combining the user's display name and username (e.g., "DisplayName (Username: actual_username)"). This provides richer context about message authors.

2.  **Tool Definitions:**
    Descriptions for tools in `gurt/config.py` and `gurt/prompt.py` (e.g., `search_user_messages`, `get_user_facts`) and their parameters have been updated to explicitly state that user identification relies on "User ID". This enhances clarity for the AI model and developers.
2025-05-27 22:48:15 -06:00
d2e20ded2a
fix: Simplify server specs output by removing uptime details 2025-05-27 22:42:03 -06:00
5958d9718b
fix: Clarify usage of execute_internal_command with user ID requirement 2025-05-27 22:39:28 -06:00
bb8cdadf47
Docs: Clarify run_terminal_command and add execute_internal_command
Updated the description for `run_terminal_command` to specify it runs in an "empty" Docker sandbox.
Added documentation for the new `execute_internal_command` tool, which executes commands on the host machine.
2025-05-27 22:35:27 -06:00
64857c683f
fix: Update bot specifications and environment details in prompt 2025-05-27 22:34:02 -06:00
3ff850a9b3
feat: Add channel ignore functionality
Implement `/gurtignore` commands to manage channels Gurt should ignore.
- Add `gurtignore add` to add a channel to the ignore list.
- Add `gurtignore remove` to remove a channel from the ignore list.
- Add `gurtignore list` to display currently ignored channels.
- Update `GurtCog` and `config.py` to support ignored channel IDs and file management.
- Ensure ignore commands are owner-only.
- Modify `listeners.py` to prevent Gurt from processing messages in ignored channels.
2025-05-27 22:19:36 -06:00
3290b50fbd
fix: Update attachment handling to use types.FileData for URI parts 2025-05-27 22:13:51 -06:00
8f578cfe03
fix: Update attachment handling to use types.Part constructor for URI parts 2025-05-27 22:10:44 -06:00
145c91c5c2
fix: Explicitly mark attachment descriptions in AI response 2025-05-27 22:02:22 -06:00