Skip to content

Allow typed artifacts in multimodal#507

Merged
KaQuMiQ merged 1 commit into
mainfrom
feature/typed_artifacts
May 8, 2026
Merged

Allow typed artifacts in multimodal#507
KaQuMiQ merged 1 commit into
mainfrom
feature/typed_artifacts

Conversation

@KaQuMiQ
Copy link
Copy Markdown
Collaborator

@KaQuMiQ KaQuMiQ commented May 8, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5aee816e-c464-4bed-8331-4572ef1ff83e

📥 Commits

Reviewing files that changed from the base of the PR and between 58f2480 and 23d711c.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • pyproject.toml
  • src/draive/multimodal/artifact.py
  • src/draive/multimodal/content.py
  • tests/test_multimodal.py

Walkthrough

This PR enhances artifact content handling in the multimodal system by introducing PEP 695-style generic type parameters and expanding the artifact API. The ArtifactContent.to_state() method now uses explicit generic parameter syntax and renames its parameter from content to state. The MultimodalContent.artifacts() method gains overloads to support typed artifact decoding through optional State subclass parameters while preserving category filtering. Additionally, MultimodalContent.to_str() accepts an optional artifact_to_str callback for custom artifact rendering. Tests validate artifact filtering, category-based selection, and typed decoding. Package version increments to 0.106.0 with haiway dependency updated to ~=0.51.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether any description content is related to the changeset. Add a pull request description explaining the motivation, implementation details, and usage of the typed artifacts feature.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Allow typed artifacts in multimodal' directly describes the main change: adding support for typed artifact decoding in multimodal content via generic State parameters.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/typed_artifacts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KaQuMiQ
Copy link
Copy Markdown
Collaborator Author

KaQuMiQ commented May 8, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@KaQuMiQ KaQuMiQ merged commit 876b77d into main May 8, 2026
3 checks passed
@KaQuMiQ KaQuMiQ deleted the feature/typed_artifacts branch May 8, 2026 09:46
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.

1 participant