AI-Ollama-Client
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/AI/Ollama/Client/Impl.pm view on Meta::CPAN
if( $res ) {
my $str = $res->get;
say $str;
}
Future::Mojo->done( defined $res );
} until => sub($done) { $done->get };
Generate the next message in a chat with a provided model.
This is a streaming endpoint, so there will be a series of responses. The final response object will include statistics and additional data from the request.
=head3 Options
=over 4
=item C<< format >>
The format to return a response in. Currently the only accepted value is json.
lib/AI/Ollama/GenerateChatCompletionResponse.pm view on Meta::CPAN
=cut
has 'load_duration' => (
is => 'ro',
isa => Int,
);
=head2 C<< message >>
A message in the chat endpoint
=cut
has 'message' => (
is => 'ro',
isa => HashRef,
);
=head2 C<< model >>
ollama/ollama-curated.json view on Meta::CPAN
{"openapi":"3.0.3","components":{"schemas":{"PushModelResponse":{"properties":{"total":{"type":"integer","description":"total size of the model","example":"2142590208"},"status":{"$ref":"#/components/schemas/PushModelStatus"},"digest":{"example":"sha...
ollama/ollama-curated.yaml view on Meta::CPAN
content:
application/x-ndjson:
schema:
$ref: '#/components/schemas/GenerateCompletionResponse'
/chat:
post:
operationId: generateChatCompletion
tags:
- Chat
summary: Generate the next message in a chat with a provided model.
description: This is a streaming endpoint, so there will be a series of responses. The final response object will include statistics and additional data from the request.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateChatCompletionRequest'
responses:
'200':
description: Successful operation.
content:
application/x-ndjson:
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.248 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )