Ana içeriğe geç

Send a stateless playground turn to the configured AI bot

POST 

/api/ai/playground/chat

Runs the real chat pipeline (AiManager → VectorSearchService → ChatExecutor) on the supplied transcript and returns the bot's reply plus debug metadata. Admin only.

Stateless: no Conversation / Message / Contact rows are created. The full transcript must be re-posted on every call so the bot sees the history. Token costs still land in ai_usage so quotas and per- credential metrics stay accurate. The fallback chain is honoured: a transient primary failure rescues onto the secondary credential and fallback_used reports which credential answered.

The response surfaces the knowledge sources whose chunks fed RAG context for this answer — TITLE + id only, never chunk text or embeddings.

Request​

Responses​

The bot reply plus debug metadata.