diff --git a/src/Model/Language/Llama.php b/src/Model/Language/Llama.php index 67bb5cd7..9d87660d 100644 --- a/src/Model/Language/Llama.php +++ b/src/Model/Language/Llama.php @@ -34,13 +34,9 @@ public function call(MessageBag $messages, array $options = []): TextResponse return new TextResponse(implode('', $response['output'])); } - if ($this->platform instanceof Ollama) { - $response = $this->platform->request('llama3.2', 'chat', ['messages' => $messages, 'stream' => false]); + $response = $this->platform->request('llama3.2', 'chat', ['messages' => $messages, 'stream' => false]); - return new TextResponse($response['message']['content']); - } - - throw new RuntimeException('Unsupported platform.'); + return new TextResponse($response['message']['content']); } /** diff --git a/src/Platform/Replicate.php b/src/Platform/Replicate.php index 4006e849..37968fca 100644 --- a/src/Platform/Replicate.php +++ b/src/Platform/Replicate.php @@ -10,7 +10,7 @@ { public function __construct( private HttpClientInterface $httpClient, - private string $apiKey, + #[\SensitiveParameter] private string $apiKey, ) { }