Repository navigation
feat: add text processing with media payloads - #1
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new text-processing API surface that can attach arbitrary source media (binary payload + MIME type) to text inputs, aligning text processing with existing audio/image “with media” flows.
Changes:
- Introduces
ProcessTextWithMedia*(JSON/options/map variants) backed by a new native C API symbol. - Registers the new native symbol in the purego FFI layer.
- Documents the new API and adds a unit test to verify binary/MIME preservation in the Go-to-native media marshaling.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents how to call ProcessTextWithMedia and clarifies binary/MIME preservation. |
| ffi.go | Adds a new purego-registered native symbol for text processing with media. |
| cortext.go | Adds Handle methods for text processing with optional media and options. |
| cortext_test.go | Adds a unit test validating makeNativeMedia preserves arbitrary bytes and MIME type. |
| CHANGELOG.md | Notes the new text-with-media processing API in the Unreleased section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
Legacy native compatibility fix pushed in
Validation:
Both pass. |
5 tasks done
Contributor
Author
|
Superseded by #2, which merges this branch and reconciles it with the engine v5 work (evidence budget, reference time and the corrected media semantics). I'm leaving this PR open for now. |
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.
Summary
Validation
go test . -shortgo test . -run TestMakeNativeMediaPreservesArbitraryBinaryAndMIME -count=1The core native release containing
cortext_process_text_with_media_json_with_optionsmust be available for the end-to-end native test; this PR does not merge that core change.