Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with ollama/ollama-curated.yaml #2

Open
b03cmans opened this issue Jan 29, 2025 · 4 comments
Open

issue with ollama/ollama-curated.yaml #2

b03cmans opened this issue Jan 29, 2025 · 4 comments

Comments

@b03cmans
Copy link

I installed AI::Ollama::Client on Strawberrry Perl 5.38 and started the Ollama server.

But, when trying to connect to the Ollama server using AI::Ollama::Client

use strict;
use warnings;
use AI::Ollama::Client;
my $client = AI::Ollama::Client->new(
    server => 'http://127.0.0.1:11434',
);

my $info = $client->listModels()->get;
for my $model ($info->models->@*) {
    say $model->model; # llama2:latest
}

I am getting this error:

Could not open 'ollama/ollama-curated.yaml' for reading: No such file or directory at C:/Dev/Perl/strawberry-perl-5.38.2.2-64bit-portable/perl/site/lib/YAML/PP/Lexer.pm line 141. at C:/Dev/Perl/strawberry-perl-5.38.2.2-64bit-portable/perl/site/lib/YAML/PP/Loader.pm line 94.

@Corion
Copy link
Owner

Corion commented Jan 29, 2025

Thank you for looking at my module and reporting this bug!

Whooops - this means that I did not properly distribute the ollama-curated.yaml . I will have to release a new version to fix that.

As a workaround, you can download the file from here and then use the following code to load it:

my $client = AI::Ollama::Client->new(
    server => 'http://127.0.0.1:11434',
    schema => YAML::PP->new( boolean => 'JSON::PP' )->load_file( 'path/to/ollama-curated.yaml' );
);

@ikegami
Copy link

ikegami commented Jan 29, 2025

I see the files in the distro, but I don't see anything that would cause them to be installed (copied). In the past, I've used File::ShareDir::Install in Makefile.PL to install the file, plus File::ShareDir in the module to locate the installed file.

@ikegami
Copy link

ikegami commented Jan 29, 2025

@Corion
Copy link
Owner

Corion commented Jan 29, 2025

Yes, File::ShareDir is what I plan to use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants