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

unauthorized #16

Open
ruzzzz6312 opened this issue Jun 6, 2024 · 0 comments
Open

unauthorized #16

ruzzzz6312 opened this issue Jun 6, 2024 · 0 comments

Comments

@ruzzzz6312
Copy link

ruzzzz6312 commented Jun 6, 2024

Highly likely issue on my end, however:
[ec2-user@app www]$ curl http://192.168.1.149:11434/api/generate -d '{
"model": "llama3",
"prompt": "Hey",
"stream":false
}'
{"model":"llama3","created_at":"2024-06-06T01:27:27.256766425Z","response":"Hey! How's it going?","done":true,"done_reason":"stop","context":[128006,882,128007,271,19182,128009,128006,78191,128007,271,19182,0,2650,596,433,2133,30,128009],"total_duration":2320969362,"load_duration":1230493,"prompt_eval_count":6,"prompt_eval_duration":798696000,"eval_count":8,"eval_duration":1479250000}[ec2-user@app www]$

<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use Cloudstudio\Ollama\Facades\Ollama;

class TestCommand extends Command
{
    protected $signature = 'test:command';
    protected $description = 'Test command';

    public function handle()
    {

        $response = Ollama::model('llama3')->show();
        print_r($response);
        }
}

shows:

[ec2-user@app www]$ php artisan test:command

Array
(
    [error] => unauthorized
)

Any thoughts?
Thanks!!

P.S. Config:

<?php

// Config for Cloudstudio/Ollama

return [
    'model' => env('OLLAMA_MODEL', 'llama3'),
    'url' => env('OLLAMA_URL', '192.168.1.149:11434'),
    'default_prompt' => env('OLLAMA_DEFAULT_PROMPT', 'Hello, how can I assist you today?'),
    'connection' => [
        'timeout' => env('OLLAMA_CONNECTION_TIMEOUT', 300),
    ],
];

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

1 participant