Fix missing audio file types in PrismMessages attachment conversion#247
Open
sulimanbenhalim wants to merge 1 commit intolaravel:0.xfrom
Open
Fix missing audio file types in PrismMessages attachment conversion#247sulimanbenhalim wants to merge 1 commit intolaravel:0.xfrom
sulimanbenhalim wants to merge 1 commit intolaravel:0.xfrom
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.
Supersedes #223
The four audio file types (Base64Audio, LocalAudio, RemoteAudio, StoredAudio) were missing from the match statement in fromLaravelAttachments() so passing any audio attachment into a conversation would throw an UnhandledMatchError at runtime
Images and documents worked fine, audio was just never added to the match
Before
After it converts cleanly to PrismAudio just like images convert to PrismImage
GPT-4o and Gemini both support audio as conversation input so this is a real use case not a theoretical one
Added tests in PrismMessagesTest covering all four audio types plus the existing image and document paths