From 2e6356d2b876d05705196425e0a9ba83ed5e7b10 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Sat, 28 Dec 2024 15:18:05 +0000 Subject: [PATCH] More API doc hacking --- docs/apis/websocket.md | 60 +++++++++++++++++++++++++++++++++++++++ prometheus/prometheus.yml | 38 ++++++++++++------------- 2 files changed, 79 insertions(+), 19 deletions(-) diff --git a/docs/apis/websocket.md b/docs/apis/websocket.md index c2e1415a..8a949598 100644 --- a/docs/apis/websocket.md +++ b/docs/apis/websocket.md @@ -69,3 +69,63 @@ e.g. } ``` +For a multi-part response, a number of responses are provided with the +same ID until the final message which has the `complete` field set to +true. + +e.g. + +Request: + +``` +{ + "id": "blrqotfefnmnh7de-20", + "service": "agent", + "request": { + "question": "What does NASA stand for?" + } +} +``` + +Responses: + +``` +{ + "id": "blrqotfefnmnh7de-20", + "response": { + "thought": "I need to query a knowledge base" + }, + "complete": false +} +``` + +``` +{ + "id": "blrqotfefnmnh7de-20", + "response": { + "observation": "Based on the provided text, NASA stands for National Aeronautics and Space Administration." + }, + "complete": false +} +``` + +``` +{ + "id": "blrqotfefnmnh7de-20", + "response": { + "thought": "I now know the final answer" + }, + "complete": false +} +``` + +``` +{ + "id": "blrqotfefnmnh7de-20", + "response": { + "answer": "National Aeronautics and Space Administration" + }, + "complete": true +} +``` + diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml index c74f5df3..24102a23 100644 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -14,6 +14,12 @@ scrape_configs: # The job name is added as a label `job=` to any timeseries # scraped from this config. + - job_name: 'pulsar' + scrape_interval: 5s + static_configs: + - targets: + - 'pulsar:8080' + - job_name: 'pdf-decoder' scrape_interval: 5s static_configs: @@ -26,122 +32,116 @@ scrape_configs: - targets: - 'chunker:8000' - - job_name: 'vectorize' scrape_interval: 5s static_configs: - targets: - 'vectorize:8000' - - job_name: 'embeddings' scrape_interval: 5s static_configs: - targets: - 'embeddings:8000' - - job_name: 'kg-extract-definitions' scrape_interval: 5s static_configs: - targets: - 'kg-extract-definitions:8000' - - job_name: 'kg-extract-topics' scrape_interval: 5s static_configs: - targets: - 'kg-extract-topics:8000' - - job_name: 'kg-extract-relationships' scrape_interval: 5s static_configs: - targets: - 'kg-extract-relationships:8000' - - job_name: 'metering' scrape_interval: 5s static_configs: - targets: - 'metering:8000' - - job_name: 'metering-rag' scrape_interval: 5s static_configs: - targets: - 'metering-rag:8000' - - job_name: 'store-graph-embeddings' scrape_interval: 5s static_configs: - targets: - 'store-graph-embeddings:8000' - - job_name: 'store-triples' scrape_interval: 5s static_configs: - targets: - 'store-triples:8000' - - job_name: 'text-completion' scrape_interval: 5s static_configs: - targets: - 'text-completion:8000' - - job_name: 'text-completion-rag' scrape_interval: 5s static_configs: - targets: - 'text-completion-rag:8000' - - job_name: 'graph-rag' scrape_interval: 5s static_configs: - targets: - 'graph-rag:8000' - - job_name: 'prompt' scrape_interval: 5s static_configs: - targets: - 'prompt:8000' - - job_name: 'prompt-rag' scrape_interval: 5s static_configs: - targets: - 'prompt-rag:8000' - - job_name: 'query-graph-embeddings' scrape_interval: 5s static_configs: - targets: - 'query-graph-embeddings:8000' - - job_name: 'query-triples' scrape_interval: 5s static_configs: - targets: - 'query-triples:8000' - - - job_name: 'pulsar' + - job_name: 'agent-manager' scrape_interval: 5s static_configs: - targets: - - 'pulsar:8080' + - 'agent-manager:8000' + - job_name: 'api-gateway' + scrape_interval: 5s + static_configs: + - targets: + - 'api-gateway:8000' + + - job_name: 'workbench-ui' + scrape_interval: 5s + static_configs: + - targets: + - 'workbench-ui:8000'