view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
sub get_module_info { %module }
if( ! caller ) {
require File::ShareDir::Install;
File::ShareDir::Install::install_share( module => "$module\::Impl" => 'ollama');
{
package MY;
require File::ShareDir::Install;
File::ShareDir::Install->import( qw( postamble ));
}
# I should maybe use something like Shipwright...
my $mm = WriteMakefile1(get_module_info);
my $version = $mm->parse_version($main_file);
regen_README($main_file, $version);
regen_EXAMPLES() if -d 'examples';
};
1;
lib/AI/Ollama/CopyModelRequest.pm view on Meta::CPAN
package AI::Ollama::CopyModelRequest 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::CopyModelRequest -
lib/AI/Ollama/CreateModelRequest.pm view on Meta::CPAN
package AI::Ollama::CreateModelRequest 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::CreateModelRequest -
lib/AI/Ollama/CreateModelResponse.pm view on Meta::CPAN
package AI::Ollama::CreateModelResponse 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::CreateModelResponse -
lib/AI/Ollama/DeleteModelRequest.pm view on Meta::CPAN
package AI::Ollama::DeleteModelRequest 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::DeleteModelRequest -
lib/AI/Ollama/GenerateChatCompletionRequest.pm view on Meta::CPAN
package AI::Ollama::GenerateChatCompletionRequest 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::GenerateChatCompletionRequest -
lib/AI/Ollama/GenerateChatCompletionResponse.pm view on Meta::CPAN
package AI::Ollama::GenerateChatCompletionResponse 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::GenerateChatCompletionResponse -
lib/AI/Ollama/GenerateCompletionRequest.pm view on Meta::CPAN
package AI::Ollama::GenerateCompletionRequest 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::GenerateCompletionRequest -
lib/AI/Ollama/GenerateCompletionResponse.pm view on Meta::CPAN
package AI::Ollama::GenerateCompletionResponse 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::GenerateCompletionResponse -
lib/AI/Ollama/GenerateEmbeddingRequest.pm view on Meta::CPAN
package AI::Ollama::GenerateEmbeddingRequest 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::GenerateEmbeddingRequest -
lib/AI/Ollama/GenerateEmbeddingResponse.pm view on Meta::CPAN
package AI::Ollama::GenerateEmbeddingResponse 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::GenerateEmbeddingResponse -
lib/AI/Ollama/Message.pm view on Meta::CPAN
package AI::Ollama::Message 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::Message -
lib/AI/Ollama/Model.pm view on Meta::CPAN
package AI::Ollama::Model 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::Model -
lib/AI/Ollama/ModelInfo.pm view on Meta::CPAN
package AI::Ollama::ModelInfo 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::ModelInfo -
lib/AI/Ollama/ModelInfoRequest.pm view on Meta::CPAN
package AI::Ollama::ModelInfoRequest 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::ModelInfoRequest -
lib/AI/Ollama/ModelsResponse.pm view on Meta::CPAN
package AI::Ollama::ModelsResponse 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::ModelsResponse -
lib/AI/Ollama/PullModelRequest.pm view on Meta::CPAN
package AI::Ollama::PullModelRequest 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::PullModelRequest -
lib/AI/Ollama/PullModelResponse.pm view on Meta::CPAN
package AI::Ollama::PullModelResponse 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::PullModelResponse -
lib/AI/Ollama/PushModelRequest.pm view on Meta::CPAN
package AI::Ollama::PushModelRequest 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::PushModelRequest -
lib/AI/Ollama/PushModelResponse.pm view on Meta::CPAN
package AI::Ollama::PushModelResponse 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::PushModelResponse -
lib/AI/Ollama/RequestOptions.pm view on Meta::CPAN
package AI::Ollama::RequestOptions 0.05;
# DO NOT EDIT! This is an autogenerated file.
use 5.020;
use Moo 2;
use experimental 'signatures';
use stable 'postderef';
use Types::Standard qw(Enum Str Bool Num Int HashRef ArrayRef);
use MooX::TypeTiny;
use namespace::clean;
=encoding utf8
=head1 NAME
AI::Ollama::RequestOptions -
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
description: Given a prompt, the model will generate a completion.
- name: Chat
description: Given a list of messages comprising a conversation, the model will return a response.
- name: Embeddings
description: Get a vector representation of a given input.
- name: Models
description: List and describe the various models available.
paths:
/generate:
post:
operationId: generateCompletion
tags:
- Completions
summary: Generate a response for a given prompt with a provided model.
description: The final response object will include statistics and additional data from the request.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateCompletionRequest'
responses:
'200':
description: Successful operation.
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:
schema:
$ref: '#/components/schemas/GenerateChatCompletionResponse'
/embeddings:
post:
operationId: generateEmbedding
tags:
- Embeddings
summary: Generate embeddings from a model.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateEmbeddingRequest'
responses:
'200':
description: Successful operation.
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateEmbeddingResponse'
/create:
post:
operationId: createModel
tags:
- Models
summary: Create a model from a Modelfile.
description: It is recommended to set `modelfile` to the content of the Modelfile rather than just set `path`. This is a requirement for remote create. Remote model creation should also create any file blobs, fields such as `FROM` and `ADAPTER`...
requestBody:
description: Create a new model from a Modelfile.
content:
application/json:
schema:
ollama/ollama-curated.yaml view on Meta::CPAN
- Models
summary: List models that are available locally.
responses:
'200':
description: Successful operation.
content:
application/json:
schema:
$ref: '#/components/schemas/ModelsResponse'
/show:
post:
operationId: showModelInfo
tags:
- Models
summary: Show details about a model including modelfile, template, parameters, license, and system prompt.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ModelInfoRequest'
responses:
'200':
description: Successful operation.
content:
application/json:
schema:
$ref: '#/components/schemas/ModelInfo'
/copy:
post:
operationId: copyModel
tags:
- Models
summary: Creates a model with another name from an existing model.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CopyModelRequest'
responses:
ollama/ollama-curated.yaml view on Meta::CPAN
summary: Delete a model and its data.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteModelRequest'
responses:
'200':
description: Successful operation.
/pull:
post:
operationId: pullModel
tags:
- Models
summary: Download a model from the ollama library.
description: Cancelled pulls are resumed from where they left off, and multiple calls will share the same download progress.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PullModelRequest'
responses:
'200':
description: Successful operation.
content:
application/x-ndjson:
schema:
$ref: '#/components/schemas/PullModelResponse'
/push:
post:
operationId: pushModel
tags:
- Models
summary: Upload a model to a model library.
description: Requires registering for ollama.ai and adding a public key first.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PushModelRequest'
ollama/ollama-curated.yaml view on Meta::CPAN
schema:
type: string
required: true
description: the SHA256 digest of the blob
example: sha256:c8edda1f17edd2f1b60253b773d837bda7b9d249a61245931a4d7c9a8d350250
responses:
'200':
description: Blob exists on the server
'404':
description: Blob was not found
post:
operationId: createBlob
tags:
- Models
summary: Create a blob from a file. Returns the server file path.
parameters:
- in: path
name: digest
schema:
type: string
required: true
openapi/petstore-expanded.yaml view on Meta::CPAN
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
default:
description: unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
description: Creates a new pet in the store. Duplicates are allowed
operationId: addPet
requestBody:
description: Pet to add to the store
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/NewPet'
responses: