feat: upgrade assistant to 0.6,0

This commit is contained in:
loks0n
2024-12-12 17:11:22 +00:00
parent ef150ac2c0
commit a12b758658
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -69,11 +69,15 @@ App::post('/v1/console/assistant')
->label('abuse-limit', 15)
->label('abuse-key', 'userId:{userId}')
->param('prompt', '', new Text(2000), 'Prompt. A string containing questions asked to the AI assistant.')
->param('systemPrompt', '', new Text(2000), 'System Prompt. A string containing context to help the AI assistant provide better responses.')
->inject('response')
->action(function (string $prompt, Response $response) {
->action(function (string $prompt, string $systemPrompt, Response $response) {
$ch = curl_init('http://appwrite-assistant:3003/');
$responseHeaders = [];
$query = json_encode(['prompt' => $prompt]);
$query = json_encode([
'prompt' => $prompt,
'systemPrompt' => $systemPrompt,
]);
$headers = ['accept: text/event-stream'];
$handleEvent = function ($ch, $data) use ($response) {
$response->chunk($data);
+1 -1
View File
@@ -868,7 +868,7 @@ services:
appwrite-assistant:
container_name: appwrite-assistant
image: appwrite/assistant:0.5.0
image: appwrite/assistant:0.6.0
networks:
- appwrite
environment: