meilisearch-php icon indicating copy to clipboard operation
meilisearch-php copied to clipboard

Add Chat Completion endpoints

Open tacman opened this issue 6 months ago • 0 comments

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

tacman avatar Jun 12 '25 15:06 tacman