Skip to content

Conversation

@KeremTurgutlu
Copy link
Contributor

@KeremTurgutlu KeremTurgutlu commented Nov 27, 2025

Merge after: AnswerDotAI/fastcore#713

TODO: Need to update the fastcore version in lisette settings.ini once the fastcore PR above is released.

Here are the changes:

  • Added support for audio and video bytes in messages.
  • Added implicit caching (completion(..., caching=True)) for non-claude models when Chat(...,cache=True).
  • Fixed AsyncStreamFormatter for non-claude models like Gemini, where thinking can interleave and can also have generation content at the final thinking chunk.
  • Fixed usage logging for non-claude models, not all models have the same usage metadata.
  • Removed unused code.
  • Created caching tests both for claude and gemini, and then commented them out as they were flaky.
  • Bumped litellm dep to 1.80.5 which adds the Gemini 3.0 support.

@KeremTurgutlu KeremTurgutlu added the enhancement New feature or request label Nov 27, 2025
@KeremTurgutlu KeremTurgutlu force-pushed the gemini-multimodal-support branch from eebe402 to 4b57207 Compare November 28, 2025 14:51
@KeremTurgutlu KeremTurgutlu requested a review from jph00 November 28, 2025 15:59
@KeremTurgutlu KeremTurgutlu marked this pull request as ready for review November 28, 2025 15:59
@RensDimmendaal RensDimmendaal mentioned this pull request Nov 28, 2025
@KeremTurgutlu KeremTurgutlu requested review from jph00 and removed request for jph00 November 28, 2025 16:23
@KeremTurgutlu KeremTurgutlu force-pushed the gemini-multimodal-support branch 2 times, most recently from 032485c to 26fc6af Compare December 4, 2025 15:39
Copy link
Contributor

@jph00 jph00 left a comment

Choose a reason for hiding this comment

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

Looking good! A couple of questions for you.

lisette/core.py Outdated
(b'\x00\x00\x01\xb3', 0): 'video/mpeg',
}

def _detect_mime(data):
Copy link
Contributor

Choose a reason for hiding this comment

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

This is nice! I've added it as fastcore.xtras.detect_mime so you can use that instead. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great thank you so much!


# %% ../nbs/00_core.ipynb
@patch
def print_hist(self:Chat):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these all removed?

Copy link
Contributor Author

@KeremTurgutlu KeremTurgutlu Dec 8, 2025

Choose a reason for hiding this comment

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

Synthetic history utils aren't used anymore, I think they were added for reconstructing tools from formatted outputs? But afaik Rens made a different implementation which doesn't use them. We can probably add back print_hist though.

@KeremTurgutlu KeremTurgutlu force-pushed the gemini-multimodal-support branch from 26fc6af to f8c41ca Compare December 8, 2025 08:56
@KeremTurgutlu
Copy link
Contributor Author

KeremTurgutlu commented Dec 8, 2025

Made a small fix to AnswerDotAI/fastcore#713

@jph00 I've made the changes to use fastcore.xtras.detect_mime and added back def print_hist(self:Chat)

@KeremTurgutlu KeremTurgutlu requested a review from jph00 December 8, 2025 09:26
@KeremTurgutlu KeremTurgutlu force-pushed the gemini-multimodal-support branch from f8c41ca to 4459917 Compare December 9, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants