chore: update assistant endpoint

This commit is contained in:
loks0n
2024-12-16 12:32:00 +00:00
parent c3d6dcad86
commit 7489b2e758
+1 -1
View File
@@ -71,7 +71,7 @@ App::post('/v1/console/assistant')
->param('prompt', '', new Text(2000), 'Prompt. A string containing questions asked to the AI assistant.')
->inject('response')
->action(function (string $prompt, Response $response) {
$ch = curl_init('http://appwrite-assistant:3003/');
$ch = curl_init('http://appwrite-assistant:3003/v1/models/assistant/prompt');
$responseHeaders = [];
$query = json_encode(['prompt' => $prompt]);
$headers = ['accept: text/event-stream'];