From e18033efd28d711fb0e1b1b8c8da179f6c436b68 Mon Sep 17 00:00:00 2001 From: Piero Savastano Date: Thu, 22 Aug 2024 21:32:04 +0200 Subject: [PATCH] endpoints --- mkdocs.yml | 1 + .../interacting.md => production/endpoints.md} | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) rename mkdocs/{technical/basics/interacting.md => production/endpoints.md} (90%) diff --git a/mkdocs.yml b/mkdocs.yml index 3693f24fe..cfd02260f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -88,6 +88,7 @@ nav: - Rabbit Hole Ingestion: framework/flows/rabbit-hole-ingestion.md - Production: + - Endpoints: production/endpoints.md - Clients: production/clients.md - Administrations: - Architecture: production/administrators/architecture.md diff --git a/mkdocs/technical/basics/interacting.md b/mkdocs/production/endpoints.md similarity index 90% rename from mkdocs/technical/basics/interacting.md rename to mkdocs/production/endpoints.md index 29336871f..92c9b971f 100644 --- a/mkdocs/technical/basics/interacting.md +++ b/mkdocs/production/endpoints.md @@ -1,6 +1,19 @@ -## 💬 Interacting with the Cat +## Websocket API + +While most network communication with LLMs is performed via HTTP, the Cat features full duplex communication: + +- two way communication: you send messages to the Cat, and the Cat can send messages to you + +## HTTP API + +You can play around with the HTTP endpoints directly on your installation, under [`localhost:1865/docs`](http://localhost:1865/docs). +You will find there most of the documentation you need, alongside code snippets in various languages. + +## Examples + +### Interacting via WebSocket Example of how to implement a simple chat system using the websocket endpoint at `localhost:1865/ws/`. !!! info "Request JSON schema" @@ -99,7 +112,7 @@ Example of how to implement a simple chat system using the websocket endpoint at cat_chat(); ``` -## 🐇 Interacting with Rabbithole +### Upload documents to the Rabbithole Example of how to send a text file (`.md`,`.pdf.`,`.txt`) to the Cat using the Rabbit Hole at `localhost:1865/rabbithole/`.