| 1 | package Langertha::Role::SystemPrompt; | ||
| 2 | # ABSTRACT: Role for APIs with system prompt | ||
| 3 | 178 | our $VERSION = '0.503'; | |
| 4 | 178 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 178 | has system_prompt => ( | |
| 7 | is => 'ro', | ||
| 8 | isa => 'Str', | ||
| 9 | predicate => 'has_system_prompt', | ||
| 10 | ); | ||
| 11 | |||
| 12 | |||
| 13 | |||
| 14 | 178 | 1; | |
| 15 | |||
| 16 | __END__ | ||
| 17 | |||
| 18 | =pod | ||
| 19 | |||
| 20 | =encoding UTF-8 | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | Langertha::Role::SystemPrompt - Role for APIs with system prompt | ||
| 25 | |||
| 26 | =head1 VERSION | ||
| 27 | |||
| 28 | version 0.503 | ||
| 29 | |||
| 30 | =head2 system_prompt | ||
| 31 | |||
| 32 | An optional system prompt string. When set, it is automatically prepended to | ||
| 33 | the conversation as a C<system> role message by L<Langertha::Role::Chat/chat_messages>. | ||
| 34 | |||
| 35 | =head1 SEE ALSO | ||
| 36 | |||
| 37 | =over | ||
| 38 | |||
| 39 | =item * L<Langertha::Role::Chat> - Chat role that injects the system prompt into messages | ||
| 40 | |||
| 41 | =item * L<Langertha::Raider> - Autonomous agent with its own C<mission> prompt | ||
| 42 | |||
| 43 | =back | ||
| 44 | |||
| 45 | =head1 SUPPORT | ||
| 46 | |||
| 47 | =head2 Issues | ||
| 48 | |||
| 49 | Please report bugs and feature requests on GitHub at | ||
| 50 | L<https://github.com/Getty/langertha/issues>. | ||
| 51 | |||
| 52 | =head2 IRC | ||
| 53 | |||
| 54 | Join C<#langertha> on C<irc.perl.org> or message Getty directly. | ||
| 55 | |||
| 56 | =head1 CONTRIBUTING | ||
| 57 | |||
| 58 | Contributions are welcome! Please fork the repository and submit a pull request. | ||
| 59 | |||
| 60 | =head1 AUTHOR | ||
| 61 | |||
| 62 | Torsten Raudssus <getty@cpan.org> | ||
| 63 | |||
| 64 | =head1 COPYRIGHT AND LICENSE | ||
| 65 | |||
| 66 | This software is copyright (c) 2026 by Torsten Raudssus L<https://raudssus.de/>. | ||
| 67 | |||
| 68 | This is free software; you can redistribute it and/or modify it under | ||
| 69 | the same terms as the Perl 5 programming language system itself. | ||
| 70 | |||
| 71 | =cut | ||