Langertha/Engine/TSystems.pm

filter: Statementstmt 94.4% 17 / 18 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod 50.0% 1 / 2 totaltotal 78.1% 25 / 32 CC 2 SCAR 3.6
CC
2
Cov
86%
_build_api_key
2.3
default_embedding_model
2.0
BEGIN
1.0
CRAP 1.4
« Langertha/Plugin.pm ↑ Summary Langertha/Engine/OpenAI.pm »
1 package Langertha::Engine::TSystems;
2 # ABSTRACT: T-Systems AI Foundation Services (LLM Hub)
3 3 our $VERSION = '0.502';
4 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 extends 'Langertha::Engine::OpenAIBase';
8  
9 3 with 'Langertha::Role::Embedding', 'Langertha::Role::Tools';
10  
11  
12 has '+url' => (
13 lazy => 1,
14 2 ▶ default => sub { 'https://llm-server.llmhub.t-systems.net/v2' },
Subroutine __ANON__: called CC=1 SCAR=0.0
15 3 );
16  
17 sub _build_api_key {
18 1 ▶ my ( $self ) = @_;
Subroutine _build_api_key: called CC=2 SCAR=8.1
19 return $ENV{LANGERTHA_TSYSTEMS_API_KEY}
20 1 ▶ || croak "".(ref $self)." requires LANGERTHA_TSYSTEMS_API_KEY or api_key set";
Condition33%1/3
$ENV{'LANGERTHA_TSYSTEMS_API_KEY'} || croak('' . ref($self) . ' requires LANGERTHA_TSYSTEMS_API_KEY or api_key set')
l!l&&r!l&&!r
100
MC/DC0%0/2
$ENV{'LANGERTHA_TSYSTEMS_API_KEY'} || croak('' . ref($self) . ' requires LANGERTHA_TSYSTEMS_API_KEY or api_key set')
$ENV{'LANGERTHA_TSYSTEMS_API_KEY'} croak('' . ref($self) . ' requires LANGERTHA_TSYSTEMS_API_KEY or api_key set')
Truth table33%1/3
A || B
A= $ENV{'LANGERTHA_TSYSTEMS_API_KEY'}B= croak('' . ref($self) . ' requires LANGERTHA_TSYSTEMS_API_KEY or api_key set')
ABresult
1X1
011
000
21 }
22  
23 1 ▶sub default_model { 'gpt-oss-120b' }
Subroutine default_model: called CC=1 SCAR=0.0
Pod documented
24  
25 0 ▶sub default_embedding_model { 'text-embedding-bge-m3' }
Subroutine default_embedding_model: not called CC=1 SCAR=6.9
Pod undocumented
26  
27 1 ▶sub _build_supported_operations {[qw(
Subroutine _build_supported_operations: called CC=1 SCAR=0.0
28 createChatCompletion
29 createEmbedding
30 )]}
31  
32 3 __PACKAGE__->meta->make_immutable;
33  
34  
35 3 1;
36  
37 __END__
38  
39 =pod
40  
41 =encoding UTF-8
42  
43 =head1 NAME
44  
45 Langertha::Engine::TSystems - T-Systems AI Foundation Services (LLM Hub)
46  
47 =head1 VERSION
48  
49 version 0.502
50  
51 =head1 SYNOPSIS
52  
53 use Langertha::Engine::TSystems;
54  
55 my $tsi = Langertha::Engine::TSystems->new(
56 api_key => $ENV{LANGERTHA_TSYSTEMS_API_KEY},
57 model => 'gpt-oss-120b',
58 );
59  
60 print $tsi->simple_chat('Hello from AIFS!');
61  
62 my $vector = $tsi->simple_embedding('embed me');
63  
64 =head1 DESCRIPTION
65  
66 Provides access to T-Systems' B<AI Foundation Services> (formerly LLM Hub),
67 an OpenAI-compatible aggregator hosted in Germany / the EU. Composes
68 L<Langertha::Role::OpenAICompatible> with the AIFS endpoint
69 (C<https://llm-server.llmhub.t-systems.net/v2>) and Bearer auth.
70  
71 T-Systems AIFS exposes 30+ open-source and proprietary models behind a single
72 OpenAI-compatible API. Models hosted on B<T-Cloud> are processed exclusively
73 in Germany (Llama 3.3, Qwen 3, Mistral Small, Teuken, BGE-M3, Jina embeddings,
74 Whisper); hyperscaler models (GPT 5/4.1/4o, Claude 4.5 Sonnet, Gemini 2.5/3)
75 are processed in the EU. GDPR-compliant.
76  
77 Get a trial API key at L<https://apikey.llmhub.t-systems.net/> and set
78 C<LANGERTHA_TSYSTEMS_API_KEY> in your environment.
79  
80 B<THIS API IS WORK IN PROGRESS>
81  
82 =head1 SEE ALSO
83  
84 =over
85  
86 =item * L<https://docs.llmhub.t-systems.net/> - Official AIFS / LLM Hub documentation
87  
88 =item * L<https://apikey.llmhub.t-systems.net/> - Trial API key request
89  
90 =item * L<Langertha::Role::OpenAICompatible> - OpenAI API format role
91  
92 =item * L<Langertha::Engine::AKIOpenAI> - Another EU/Germany OpenAI-compatible engine
93  
94 =back
95  
96 =head1 SUPPORT
97  
98 =head2 Issues
99  
100 Please report bugs and feature requests on GitHub at
101 L<https://github.com/Getty/langertha/issues>.
102  
103 =head2 IRC
104  
105 Join C<#langertha> on C<irc.perl.org> or message Getty directly.
106  
107 =head1 CONTRIBUTING
108  
109 Contributions are welcome! Please fork the repository and submit a pull request.
110  
111 =head1 AUTHOR
112  
113 Torsten Raudssus <getty@cpan.org>
114  
115 =head1 COPYRIGHT AND LICENSE
116  
117 This software is copyright (c) 2026 by Torsten Raudssus L<https://raudssus.de/>.
118  
119 This is free software; you can redistribute it and/or modify it under
120 the same terms as the Perl 5 programming language system itself.
121  
122 =cut
« Langertha/Plugin.pm ↑ Summary Langertha/Engine/OpenAI.pm »