AgentSea.Web.ChatController (agentsea_web v0.1.0)

Copy Markdown

OpenAI-compatible POST /v1/chat/completions, served through AgentSea.Gateway.

Any OpenAI client can point its base URL at this endpoint. Requests are routed across the gateway's configured providers (strategy + failover + circuit breaking); responses are mapped back to the OpenAI shape. With stream: true the gateway's streaming path is used and each provider event is forwarded as an OpenAI Server-Sent-Event chunk — real token streaming, not a post-hoc split.

The gateway server is resolved from config :agentsea_web, :gateway (default AgentSea.Web.Gateway).

Summary

Functions

create(conn, params)