fix: Groq Content Parts, Fixups Refactor, and Gemini Caching#103
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notes
Generated Summary
Fixupclass to allowcan_fixmethod to return a type ofbool | t.Literal["once"]instead of justbool, enhancing its functionality to indicate if a fix can be applied only once.with_fixupsdecorator to streamline the application of fixups with persistent state management, improving the retry logic in async functions.Fixupsdataclass usage in theGeneratorclass, simplifying the error handling mechanism.CacheTooSmallFixupandGroqAssistantContentFixupclasses, which provide specific error-handling strategies for their respective cases._generate_messagemethod inLiteLLMGeneratorto use the newwith_fixupsdecorator, improving readability and maintainability.Messageclass to support compatibility flags, allowing dynamic handling of message content types for better API interactions.This summary was generated with ❤️ by rigging
Generated Summary
Summary of changes related to enhancing fixup functionality and compatibility handling.
with_fixupsfor applying fixup logic with persistent state to asynchronous functions.can_fixmethod inFixupto optionally return a literal indicating the fix can be applied "once".Fixupsdata class and instead integrated the fixup logic directly into methods using the decorator.CacheTooSmallFixupandGroqAssistantContentFixupwith tailoredcan_fixandfixmethods.Messageclass to include compatibility flags, allowing messages to adapt content format based on API requirements.Generatorclass._generate_messagemethod to utilize newwith_fixupsdecorator, streamlining error handling while generating messages.Potential impacts:
This summary was generated with ❤️ by rigging