mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-26 00:46:22 +02:00
Add AsyncAPI spec for websocket (#613)
* AsyncAPI for websocket docs * Delete old docs * Update docs/README.md to point to docs site * Add generated API docs
This commit is contained in:
parent
fce43ae035
commit
8a17375603
110 changed files with 8325 additions and 23324 deletions
|
|
@ -0,0 +1,28 @@
|
|||
type: object
|
||||
description: WebSocket request for agent service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: agent
|
||||
description: Service identifier for agent service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/agent/AgentRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: agent
|
||||
flow: my-flow
|
||||
request:
|
||||
question: What is quantum computing?
|
||||
streaming: true
|
||||
system-prompt: You are a helpful assistant
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
type: object
|
||||
description: WebSocket request for collection-management service (global service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: collection-management
|
||||
description: Service identifier for collection-management service
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/collection/CollectionRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: collection-management
|
||||
request:
|
||||
operation: list
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
type: object
|
||||
description: WebSocket request for config service (global service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: config
|
||||
description: Service identifier for config service
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/config/ConfigRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: config
|
||||
request:
|
||||
operation: list
|
||||
type: flow
|
||||
- id: req-2
|
||||
service: config
|
||||
request:
|
||||
operation: get
|
||||
keys:
|
||||
- type: flow
|
||||
key: my-flow
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
type: object
|
||||
description: WebSocket request for document-embeddings service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: document-embeddings
|
||||
description: Service identifier for document-embeddings service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/embeddings-query/DocumentEmbeddingsQueryRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: document-embeddings
|
||||
flow: my-flow
|
||||
request:
|
||||
text: quantum computing
|
||||
limit: 10
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
type: object
|
||||
description: WebSocket request for document-load service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: document-load
|
||||
description: Service identifier for document-load service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/loading/DocumentLoadRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: document-load
|
||||
flow: my-flow
|
||||
request:
|
||||
url: https://example.com/document.pdf
|
||||
collection: default
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
type: object
|
||||
description: WebSocket request for document-rag service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: document-rag
|
||||
description: Service identifier for document-rag service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/rag/DocumentRagRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: document-rag
|
||||
flow: my-flow
|
||||
request:
|
||||
query: What are the main features?
|
||||
streaming: true
|
||||
doc-limit: 20
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
type: object
|
||||
description: WebSocket request for embeddings service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: embeddings
|
||||
description: Service identifier for embeddings service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/embeddings/EmbeddingsRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: embeddings
|
||||
flow: my-flow
|
||||
request:
|
||||
text: What is quantum computing?
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
type: object
|
||||
description: WebSocket request for flow service (global service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: flow
|
||||
description: Service identifier for flow service
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/flow/FlowRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: flow
|
||||
request:
|
||||
operation: list
|
||||
- id: req-2
|
||||
service: flow
|
||||
request:
|
||||
operation: start
|
||||
flow: my-flow
|
||||
blueprint: default-blueprint
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
type: object
|
||||
description: WebSocket request for graph-embeddings service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: graph-embeddings
|
||||
description: Service identifier for graph-embeddings service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/embeddings-query/GraphEmbeddingsQueryRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: graph-embeddings
|
||||
flow: my-flow
|
||||
request:
|
||||
text: quantum computing
|
||||
limit: 10
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
type: object
|
||||
description: WebSocket request for graph-rag service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: graph-rag
|
||||
description: Service identifier for graph-rag service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/rag/GraphRagRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: graph-rag
|
||||
flow: my-flow
|
||||
request:
|
||||
query: What entities are related to quantum computing?
|
||||
streaming: true
|
||||
triple-limit: 100
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
type: object
|
||||
description: WebSocket request for knowledge service (global service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: knowledge
|
||||
description: Service identifier for knowledge service
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/knowledge/KnowledgeRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: knowledge
|
||||
request:
|
||||
operation: store
|
||||
triples:
|
||||
- s:
|
||||
v: https://example.com/entity1
|
||||
e: true
|
||||
p:
|
||||
v: https://example.com/relates-to
|
||||
e: true
|
||||
o:
|
||||
v: https://example.com/entity2
|
||||
e: true
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
type: object
|
||||
description: WebSocket request for librarian service (global service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: librarian
|
||||
description: Service identifier for librarian service
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/librarian/LibrarianRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: librarian
|
||||
request:
|
||||
operation: list
|
||||
collection: default
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
type: object
|
||||
description: WebSocket request for mcp-tool service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: mcp-tool
|
||||
description: Service identifier for mcp-tool service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/mcp-tool/McpToolRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: mcp-tool
|
||||
flow: my-flow
|
||||
request:
|
||||
tool: calculator
|
||||
arguments:
|
||||
operation: add
|
||||
a: 5
|
||||
b: 3
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
type: object
|
||||
description: WebSocket request for nlp-query service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: nlp-query
|
||||
description: Service identifier for nlp-query service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/query/NlpQueryRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: nlp-query
|
||||
flow: my-flow
|
||||
request:
|
||||
query: Show me all entities related to quantum computing
|
||||
limit: 50
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
type: object
|
||||
description: WebSocket request for objects service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: objects
|
||||
description: Service identifier for objects service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/query/ObjectsQueryRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: objects
|
||||
flow: my-flow
|
||||
request:
|
||||
query: "{ entity(id: \"https://example.com/entity1\") { properties { key value } } }"
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
type: object
|
||||
description: WebSocket request for prompt service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: prompt
|
||||
description: Service identifier for prompt service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/prompt/PromptRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: prompt
|
||||
flow: my-flow
|
||||
request:
|
||||
template: default-template
|
||||
variables:
|
||||
topic: quantum computing
|
||||
style: technical
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
type: object
|
||||
description: WebSocket request for structured-diag service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: structured-diag
|
||||
description: Service identifier for structured-diag service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/diag/StructuredDiagRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: structured-diag
|
||||
flow: my-flow
|
||||
request:
|
||||
operation: status
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
type: object
|
||||
description: WebSocket request for structured-query service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: structured-query
|
||||
description: Service identifier for structured-query service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/query/StructuredQueryRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: structured-query
|
||||
flow: my-flow
|
||||
request:
|
||||
query:
|
||||
type: entity
|
||||
filters:
|
||||
- property: type
|
||||
value: Person
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
type: object
|
||||
description: WebSocket request for text-completion service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: text-completion
|
||||
description: Service identifier for text-completion service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/text-completion/TextCompletionRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: text-completion
|
||||
flow: my-flow
|
||||
request:
|
||||
prompt: Once upon a time
|
||||
streaming: true
|
||||
max-output-tokens: 100
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
type: object
|
||||
description: WebSocket request for text-load service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: text-load
|
||||
description: Service identifier for text-load service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/loading/TextLoadRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: text-load
|
||||
flow: my-flow
|
||||
request:
|
||||
text: This is the document content to be loaded into the knowledge graph.
|
||||
collection: default
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
type: object
|
||||
description: WebSocket request for triples service (flow-hosted service)
|
||||
required:
|
||||
- id
|
||||
- service
|
||||
- flow
|
||||
- request
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique request identifier
|
||||
service:
|
||||
type: string
|
||||
const: triples
|
||||
description: Service identifier for triples service
|
||||
flow:
|
||||
type: string
|
||||
description: Flow ID
|
||||
request:
|
||||
$ref: '../../../../api/components/schemas/query/TriplesQueryRequest.yaml'
|
||||
examples:
|
||||
- id: req-1
|
||||
service: triples
|
||||
flow: my-flow
|
||||
request:
|
||||
s:
|
||||
v: https://example.com/entity1
|
||||
e: true
|
||||
limit: 100
|
||||
Loading…
Add table
Add a link
Reference in a new issue