More API doc hacking

This commit is contained in:
Cyber MacGeddon 2024-12-28 15:14:45 +00:00
parent 779c62d328
commit 4b699159fe
7 changed files with 50 additions and 3 deletions

View file

@ -66,4 +66,6 @@ Cons:
- [Agent](api-agent.md)
- [Embeddings](api-embeddings.md)
- [Text completion](api-text-completion.md)
- [Graph embeddings](api-graph-embeddings.md)
- [Triples query](api-triples-query.md)

View file

@ -0,0 +1,16 @@
{"id":"blrqotfefnmnh7de-20","service":"agent","request":{"question":"What does NASA stand for?"}}
{"id": "blrqotfefnmnh7de-20", "response": {"thought": "I need to query a knowledge base to find out what NASA stands for."}, "complete": fals}e
{"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}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,9 @@
{"id":"blrqotfefnmnh7de-1","service":"text-completion","request":{"system":"You are a helpful agent","prompt":"What does NASA stand for?"}}
{"id": "blrqotfefnmnh7de-1", "response": {"response": "NASA stands for the National Aeronautics and Space Administration.\n"}, "complete": true}

View file

@ -0,0 +1,7 @@
{"id":"qgzw1287vfjc8wsk-4","service":"triples-query","request":{"s":{"v":"http://trustgraph.ai/e/space-station-modules","e":true},"p":{"v":"http://www.w3.org/2000/01/rdf-schema#label","e":true},"limit":1}}
{"id": "qgzw1287vfjc8wsk-4", "response": {"response": [{"s": {"v": "http://trustgraph.ai/e/space-station-modules", "e": true}, "p": {"v": "http://www.w3.org/2000/01/rdf-schema#label", "e": true}, "o": {"v": "space station modules", "e": false}}]}, "complete": true}

View file

@ -6,10 +6,11 @@ The websocket service is provided by the `api-gateway` service on port
## URL
Depending on how the service is hosted, the websocket is invoked on URL:
Depending on how the service is hosted, the websocket is invoked on this
URL on `api-gateway`:
```
ws://api-gateway:8088/api/v1/socket
/api/v1/socket
```
When hosted using docker compose, you can access the service at
@ -22,7 +23,8 @@ A request message is a JSON message containing 3 fields:
- `id`: A unique ID which is used to correlate requests and responses.
You should make sure it is unique.
- `service`: The name of the service to invoke.
- `request`: The request body which is passed to the service.
- `request`: The request body which is passed to the service - this is
defined in the API documentation for that service.
e.g.