Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/getty/langertha
Perl Framework for AI - Langertha - the viking of AI
https://github.com/getty/langertha
ai anthropic groq openai perl vllm whisper
Last synced: about 4 hours ago
JSON representation
Perl Framework for AI - Langertha - the viking of AI
- Host: GitHub
- URL: https://github.com/getty/langertha
- Owner: Getty
- Created: 2024-06-15T17:26:27.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-01-25T18:32:44.000Z (14 days ago)
- Last Synced: 2025-01-25T19:25:57.848Z (14 days ago)
- Topics: ai, anthropic, groq, openai, perl, vllm, whisper
- Language: Perl
- Homepage:
- Size: 299 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SYNOPSIS
my $system_prompt = <<__EOP__;
You are a helpful assistant, but you are kept hostage in the basement
of Getty, who lured you into his home with nice perspective about AI!__EOP__
Using [https://ollama.com/](https://ollama.com/):
use Langertha::Ollama;
my $ollama = Langertha::Engine::Ollama->new(
url => 'http://127.0.0.1:11434',
model => 'llama3.1',
system_prompt => $system_prompt,
);print $ollama->simple_chat('Do you wanna build a snowman?');
Using [https://platform.openai.com/](https://platform.openai.com/):
use Langertha::OpenAI;
my $openai = Langertha::Engine::OpenAI->new(
api_key => $ENV{OPENAI_API_KEY},
model => 'gpt-4o-mini',
system_prompt => $system_prompt,
);print $openai->simple_chat('Do you wanna build a snowman?');
Using [https://console.anthropic.com/](https://console.anthropic.com/):
use Langertha::Anthropic;
my $claude = Langertha::Engine::Anthropic->new(
api_key => $ENV{ANTHROPIC_API_KEY},
model => 'claude-3-5-sonnet-20240620',
);print $claude->simple_chat('Generate Perl Moose classes to represent GeoJSON data.');
Using [https://console.groq.com/](https://console.groq.com/):
use Langertha::Engine::Groq;
my $groq = Langertha::Engine::Groq->new(
api_key => $ENV{GROQ_API_KEY},
model => 'llama3-8b-8192',
system_prompt => 'You are a helpful assistant',
);print($groq->simple_chat('Say something nice'));
# DESCRIPTION
**THIS API IS WORK IN PROGRESS**
# SUPPORT
Repository
https://github.com/Getty/langertha
Pull request and additional contributors are welcomeIssue Tracker
https://github.com/Getty/langertha/issues
Discord
https://discord.gg/Y2avVYpquV
IRC
irc://irc.perl.org/ai