Langertha-Skeid
view release on metacpan or search on metacpan
.claude/skills/langertha/SKILL.md view on Meta::CPAN
<roles>
## Composable Roles
Engines compose feature roles:
| Role | Feature |
|------|---------|
| `Langertha::Role::Chat` | `simple_chat`, `simple_chat_f` |
| `Langertha::Role::Tools` | `chat_with_tools_f` (MCP loop) |
| `Langertha::Role::Streaming` | SSE/NDJSON streaming |
| `Langertha::Role::Embedding` | Vector embeddings |
| `Langertha::Role::Transcription` | Audio-to-text |
| `Langertha::Role::ImageGeneration` | Image generation |
| `Langertha::Role::SystemPrompt` | System prompt management |
| `Langertha::Role::Temperature` | Generation parameters |
| `Langertha::Role::ResponseFormat` | JSON mode / structured output |
| `Langertha::Role::Models` | Model listing |
| `Langertha::Role::Langfuse` | Observability |
| `Langertha::Role::HermesTools` | XML tag tool calling |
| `Langertha::Role::ThinkTag` | Chain-of-thought filtering |
lib/Langertha/Skeid/Proxy.pm view on Meta::CPAN
my ($c) = @_;
my $body = $c->req->json;
unless (ref($body) eq 'HASH') {
$c->render(json => { error => { message => 'Invalid JSON body', type => 'invalid_request_error' } }, status => 400);
return;
}
if ($body->{stream}) {
$c->render(json => {
error => {
message => 'Anthropic streaming is not implemented in Skeid proxy yet',
type => 'not_supported_error',
}
}, status => 501);
return;
}
my $openai_body = _anthropic_request_to_openai($body);
my $model = $openai_body->{model} // '';
my $api_key_id = _request_api_key_id($c);
lib/Langertha/Skeid/Proxy.pm view on Meta::CPAN
sub _handle_ollama_chat {
my ($c) = @_;
my $body = $c->req->json;
unless (ref($body) eq 'HASH') {
$c->render(json => { error => 'Invalid JSON body' }, status => 400);
return;
}
if ($body->{stream}) {
$c->render(json => { error => 'Ollama streaming is not implemented in Skeid proxy yet' }, status => 501);
return;
}
my $openai_body = {
model => ($body->{model} // ''),
messages => ($body->{messages} || []),
(defined($body->{options}{temperature}) ? (temperature => 0 + $body->{options}{temperature}) : ()),
(defined($body->{options}{num_predict}) ? (max_tokens => 0 + $body->{options}{num_predict}) : ()),
(defined($body->{tools}) ? (tools => $body->{tools}) : ()),
(defined($body->{tool_choice}) ? (tool_choice => $body->{tool_choice}) : ()),
( run in 1.862 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )