NAME
Langertha::Content - Base role for canonical multimodal content blocks with cross-provider serialization
VERSION
version 0.500
SYNOPSIS
package Langertha::Content::Image;
use Moose;
with 'Langertha::Content';
sub to_openai { ... }
sub to_anthropic { ... }
sub to_gemini { ... }
DESCRIPTION
Marker role for canonical content blocks that can be embedded inside the content arrayref of a chat message and serialized to any provider wire format by Langertha::Role::Chat.
Implementations must provide to_openai, to_anthropic, and to_gemini, returning the HashRef block the respective provider expects inside its message content / parts array.
SEE ALSO
Langertha::Content::Image - Image (URL / base64 / local file) content block
Langertha::ToolChoice - Sibling value object for tool_choice normalization
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha/issues.
IRC
Join #langertha on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <getty@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.