Skip to content

Commit 0a67201

Browse files
committed
[Ollama] simplify example
1 parent b8cb4a3 commit 0a67201

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

examples/ollama/chat-llama.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
require_once dirname(__DIR__).'/bootstrap.php';
1919

2020
$platform = PlatformFactory::create(env('OLLAMA_HOST_URL'), http_client());
21-
$ollamaModel = $_SERVER['OLLAMA_MODEL'] ?? '';
22-
$model = new Ollama($ollamaModel);
21+
$model = new Ollama($_SERVER['OLLAMA_MODEL'] ?? '');
2322

2423
$agent = new Agent($platform, $model, logger: logger());
2524
$messages = new MessageBag(
@@ -33,5 +32,3 @@
3332
} catch(InvalidArgumentException $e) {
3433
echo $e->getMessage() . "\nMaybe use a different model?\n";
3534
}
36-
37-
echo $response;

0 commit comments

Comments
 (0)