diff --git a/docs/apis/api-agent.md b/docs/apis/api-agent.md index 99e28a26..fab7b32b 100644 --- a/docs/apis/api-agent.md +++ b/docs/apis/api-agent.md @@ -18,7 +18,7 @@ The request contains the following fields: ### Response -The request contains the following fields: +The response contains the following fields: - `thought`: Optional, a string, provides an interim agent thought - `observation`: Optional, a string, provides an interim agent thought - `answer`: Optional, a string, provides the final answer @@ -61,6 +61,7 @@ Request: { "id": "blrqotfefnmnh7de-20", "service": "agent", + "flow": "default", "request": { "question": "What does NASA stand for?" } diff --git a/docs/apis/api-embeddings.md b/docs/apis/api-embeddings.md index b66280cb..7eda096d 100644 --- a/docs/apis/api-embeddings.md +++ b/docs/apis/api-embeddings.md @@ -10,7 +10,7 @@ The request contains the following fields: ### Response -The request contains the following fields: +The response contains the following fields: - `vectors`: Embeddings response, an array of arrays. An embedding is an array of floating-point numbers. As multiple embeddings may be returned, an array of embeddings is returned, hence an array @@ -51,6 +51,7 @@ Request: { "id": "qgzw1287vfjc8wsk-2", "service": "embeddings", + "flow": "default", "request": { "text": "What is a cat?" } diff --git a/docs/apis/api-graph-embeddings.md b/docs/apis/api-graph-embeddings.md index 9af8b6f9..368d4678 100644 --- a/docs/apis/api-graph-embeddings.md +++ b/docs/apis/api-graph-embeddings.md @@ -17,7 +17,7 @@ The request contains the following fields: ### Response -The request contains the following fields: +The response contains the following fields: - `entities`: An array of graph entities. The entity type is described here: TrustGraph uses the same schema for knowledge graph elements: @@ -85,6 +85,7 @@ Request: { "id": "qgzw1287vfjc8wsk-3", "service": "graph-embeddings-query", + "flow": "default", "request": { "vectors": [ [ diff --git a/docs/apis/api-graph-rag.md b/docs/apis/api-graph-rag.md index 96821a38..b32c4682 100644 --- a/docs/apis/api-graph-rag.md +++ b/docs/apis/api-graph-rag.md @@ -14,7 +14,7 @@ The request contains the following fields: ### Response -The request contains the following fields: +The response contains the following fields: - `response`: LLM response ## REST service @@ -52,6 +52,7 @@ Request: { "id": "blrqotfefnmnh7de-14", "service": "graph-rag", + "flow": "default", "request": { "query": "What does NASA stand for?" } diff --git a/docs/apis/api-prompt.md b/docs/apis/api-prompt.md index 9bb0cb49..ff50a6e2 100644 --- a/docs/apis/api-prompt.md +++ b/docs/apis/api-prompt.md @@ -15,7 +15,7 @@ The request contains the following fields: ### Response -The request contains either of these fields: +The response contains either of these fields: - `text`: A plain text response - `object`: A structured object, JSON-encoded @@ -60,6 +60,7 @@ Request: { "id": "akshfkiehfkseffh-142", "service": "prompt", + "flow": "default", "request": { "id": "extract-definitions", "variables": { diff --git a/docs/apis/api-text-completion.md b/docs/apis/api-text-completion.md index b93c4c8a..1d8eb1c2 100644 --- a/docs/apis/api-text-completion.md +++ b/docs/apis/api-text-completion.md @@ -19,7 +19,7 @@ The request contains the following fields: ### Response -The request contains the following fields: +The response contains the following fields: - `response`: LLM response ## REST service @@ -59,6 +59,7 @@ Request: { "id": "blrqotfefnmnh7de-1", "service": "text-completion", + "flow": "default", "request": { "system": "You are a helpful agent", "prompt": "What does NASA stand for?" diff --git a/docs/apis/api-triples-query.md b/docs/apis/api-triples-query.md index 6e096a56..f6038163 100644 --- a/docs/apis/api-triples-query.md +++ b/docs/apis/api-triples-query.md @@ -21,7 +21,7 @@ Returned triples will match all of `s`, `p` and `o` where provided. ### Response -The request contains the following fields: +The response contains the following fields: - `response`: A list of triples. Each triple contains `s`, `p` and `o` fields describing the @@ -58,6 +58,7 @@ Request: { "id": "qgzw1287vfjc8wsk-4", "service": "triples-query", + "flow": "default", "request": { "s": { "v": "http://trustgraph.ai/e/space-station-modules", diff --git a/docs/apis/websocket.md b/docs/apis/websocket.md index 1895646c..07307cf4 100644 --- a/docs/apis/websocket.md +++ b/docs/apis/websocket.md @@ -18,13 +18,16 @@ When hosted using docker compose, you can access the service at ## Request -A request message is a JSON message containing 3 fields: +A request message is a JSON message containing 3/4 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 - this is defined in the API documentation for that service. +- `flow`: Some APIs are supported by processors launched within a flow, + are are dependent on a flow running. For such APIs, the flow identifier + needs to be provided. e.g. @@ -32,6 +35,7 @@ e.g. { "id": "qgzw1287vfjc8wsk-1", "service": "graph-rag", + "flow": "default", "request": { "query": "What does NASA stand for?" } @@ -86,6 +90,7 @@ Request: { "id": "blrqotfefnmnh7de-20", "service": "agent", + "flow": "default", "request": { "question": "What does NASA stand for?" }