Skip to content

Commit

Permalink
Update src/Platform/Replicate.php
Browse files Browse the repository at this point in the history
Co-authored-by: Oskar Stark <[email protected]>
  • Loading branch information
chr-hertel and OskarStark committed Oct 12, 2024
1 parent 5d79bcb commit 003ddca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/Model/Language/Llama.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Platform/Replicate.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
public function __construct(
private HttpClientInterface $httpClient,
private string $apiKey,
#[\SensitiveParameter] private string $apiKey,
) {
}

Expand Down

0 comments on commit 003ddca

Please sign in to comment.