docs(ai): add curl quick-start to Atlas AI chat page
This commit is contained in:
parent
370007813d
commit
e81658d1d2
@ -59,6 +59,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section class="card">
|
||||||
|
<h2>API quick start</h2>
|
||||||
|
<p class="text">
|
||||||
|
The UI hits <code>/api/ai/chat</code> on the same host. External callers can hit the public endpoint
|
||||||
|
<code>https://chat.ai.bstein.dev/api/ai/chat</code>. POST JSON with a <code>message</code> and optional
|
||||||
|
<code>history</code>.
|
||||||
|
</p>
|
||||||
|
<pre class="mono snippet">
|
||||||
|
curl -X POST https://chat.ai.bstein.dev/api/ai/chat \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-d '{"message":"hi, what is your name?"}'</pre
|
||||||
|
>
|
||||||
|
<p class="text">
|
||||||
|
Responses stream in the UI. API callers get either a JSON body <code>{ reply, latency_ms }</code> or a streamed text
|
||||||
|
body if available.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user