Skip to content

General Guide

Lyrcaxis edited this page Oct 20, 2024 · 2 revisions

Endpoints can be reached via HTTP Requests. Each endpoint has an associated query object that it expects as body, and writes back something as a Response.

When marking stream = true in a query, the server will keep writing to the HTTP Response's body as soon as some info is available. Otherwise all at once on end.

Streamed responses follow this format: $"data: {JSON.Serialize(outputObj)}\n\n". Check the javascript examples for a way to parse JUST the response.

Chat Endpoint "/chat/completion":POST

Completion Endpoint "/text-completion/completion":POST

Batch Endpoint "/batch":POST

Note: Query Batches can contain both Chat & Completion Queries. In this case, the Completion queries will obtain an ID first.

(Beta) Classification Endpoint "/classify":POST

Note: The classification endpoint probably needs user customization before usage.