Skip to content

Add type to metadata#19

Merged
hiyouga merged 2 commits intomainfrom
hiyouga/type
Jan 1, 2026
Merged

Add type to metadata#19
hiyouga merged 2 commits intomainfrom
hiyouga/type

Conversation

@hiyouga
Copy link
Copy Markdown
Contributor

@hiyouga hiyouga commented Jan 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 1, 2026 04:27
@hiyouga hiyouga merged commit 0ef9fcb into main Jan 1, 2026
3 checks passed
@hiyouga hiyouga deleted the hiyouga/type branch January 1, 2026 04:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds type annotation to a method parameter and standardizes the metadata title across bot implementations. The main changes involve improving type safety in the BareGeminiBot class and aligning the PrettyGeminiBot metadata title format with its parent class.

  • Added type annotation types.GenerateContentResponseUsageMetadata to the usage_metadata parameter in _format_usage_log method
  • Changed the metadata title in PrettyGeminiBot from a dynamic expression-based emoji to a static "💡 Answer"

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
mini_ema/bot/bare_gemini_bot.py Added type annotation to _format_usage_log method's usage_metadata parameter for improved type safety
mini_ema/bot/pretty_gemini_bot.py Changed metadata title from dynamic emoji based on character expression to static "💡 Answer" label
Comments suppressed due to low confidence (1)

mini_ema/bot/pretty_gemini_bot.py:46

class PrettyGeminiBot(BareGeminiBot):

"content": content,
"metadata": {
"title": f"{self._get_emoji(ema_message.expression)} Ema",
"title": "💡 Answer",
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title has been changed from a dynamic expression-based title using f"{self._get_emoji(ema_message.expression)} Ema" to a static "💡 Answer". This removes the dynamic emoji functionality that reflected the character's expression (smile, confused, sad, etc.) and the character name "Ema". This makes the _get_emoji method unused and reduces the information conveyed to users about the bot's emotional state. Consider whether this loss of functionality is intentional.

Suggested change
"title": "💡 Answer",
"title": f"{self._get_emoji(ema_message.expression)} Ema",

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants