NAME

WebService::Ollama::Response - ollama response

VERSION

Version 0.08

SYNOPSIS

my $response = WebService::Ollama::Response(%response_attributes);

ATTRIBUTES

done

context

total_duration

load_duration

model

create_at

eval_count

eval_duration

done_reason

response

prompt_eval_duration

prompt_eval_count

message

status

digest

total

completed

version

embeddings

models

SUBROUNTINES/METHODS

has_tool_calls

Returns true if the response contains tool calls.

if ($response->has_tool_calls) {
    my $calls = $response->extract_tool_calls;
}

extract_tool_calls

Extract tool calls from the response. Returns an arrayref of tool call structures. Handles both native Ollama tool_calls and fallback parsing from content text.

my $calls = $response->extract_tool_calls;
for my $call (@$calls) {
    my $name = $call->{function}{name};
    my $args = $call->{function}{arguments};
}

json_response

JSON decode the response.

$response->json_response;

AUTHOR

LNATION, <email at lnation.org>

BUGS

Please report any bugs or feature requests to bug-webservice-ollama at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-Ollama. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc WebService::Ollama

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2026 by LNATION.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)