3 ms·
I use Raku in production. It's the best language to deal with text because building parsers so so damn nice. I'm shocked this isn't the top language to create a
by mempko 2y ago
I use Raku in production. It's the best language to deal with text because building parsers so so damn nice. I'm shocked this isn't the top language to create an LLM text pipeline.
- antononcube 2y agoDo you use any of Raku's LLM packages? If yes, which ones?
- mempko 2y agoI have not used any. What are some good ones to look at?
- bloopernova 2y agoVery late to the thread, but I was wondering if you knew of a good example of Raku calling an API over https, polling the API until it returns a specific value?
- antononcube 2y agoHere is one way: use HTTP::UserAgent; use JSON::Fast; my $url = 'https://api.coindesk.com/v1/bpi/currentprice.json'; my $ua = HTTP::UserAgent.new; my $total-time = 0; loop { my $response = $ua.get($url); if $response.is-success { my $data = from-json $response.content; my $rate = $data<chartName>; say "Current chart name: $rate"; #last if $rate eq 'Bitcoin'; last if $total-time ≥ 16; } else { say "Failed to fetch data: {$response.status-line}"; } sleep 3; # Poll every 3 seconds $total-time += 3; } (Tweak / uncomment / rename the $rate variable assignments and checks.)
- bloopernova 2y agoWow, huge thanks, that's super helpful :)
- antononcube 2y agoSure, good luck!