diff --git a/README.md b/README.md index 2af6ce1..d30fb93 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ $response = Ollama::model('Llama2')->show(); ### Copy a Model ```php -Ollama::model('Llama2')->copy('newDestination'); +Ollama::model('Llama2')->copy('NewModel'); ``` ### Delete a Model diff --git a/src/Ollama.php b/src/Ollama.php index d2a88e0..8be71be 100755 --- a/src/Ollama.php +++ b/src/Ollama.php @@ -19,7 +19,7 @@ class Ollama protected $prompt; protected $format; protected $options; - protected $stream; + protected $stream = false; protected $raw; protected $agent; @@ -30,7 +30,6 @@ public function __construct(ModelService $modelService) { $this->modelService = $modelService; $this->model = config('ollama.model'); - $this->options = []; } /** @@ -53,7 +52,7 @@ public function agent(string $agent) */ public function prompt(string $prompt) { - $this->prompt = $this->agent ? $this->agent . ' ' . $prompt : $prompt; + $this->prompt = $prompt; return $this; } @@ -88,7 +87,7 @@ public function format(string $format) * @param array $options * @return $this */ - public function options(array $options) + public function options(array $options = []) { $this->options = $options; return $this; @@ -100,7 +99,7 @@ public function options(array $options) * @param bool $stream * @return $this */ - public function stream(bool $stream) + public function stream(bool $stream = false) { $this->stream = $stream; return $this; @@ -196,6 +195,7 @@ public function ask() { return $this->sendRequest('/api/generate', [ 'model' => $this->model, + 'system' => $this->agent, 'prompt' => $this->prompt, 'format' => $this->format, 'options' => $this->options,