meilisearch-php
meilisearch-php copied to clipboard
Add Chat Completion endpoints
Although it's still an experimental feature, it'd be nice to have the chat methods available to the client.
In particular, it's a bit confusing because to create an assistant you send a PATCH to the endpoint.
curl \
-X PATCH 'http://localhost:7700/chats/my-assistant/settings' \
-H 'Authorization: Bearer MASTER_KEY' \
-H 'Content-Type: application/json' \
--data-binary '{
"source": "openAi",
"apiKey": "sk-abc...",
"prompts": {
"system": "You are a helpful assistant. Answer questions based only on the provided context."
}
}'
https://www.meilisearch.com/docs/guides/ai/getting_started_with_chat