mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
Added GCP and Minikube output (#59)
* Added a config to create Minikube k8s, uses hostpath volumes * Reworked templater to produce docker compose and minikube output * Fix config templates
This commit is contained in:
parent
f661791bbf
commit
0ae6feddb0
62 changed files with 37961 additions and 7077 deletions
721
deploy/docker-compose/tg-launch-azure-cassandra.yaml
Normal file
721
deploy/docker-compose/tg-launch-azure-cassandra.yaml
Normal file
|
|
@ -0,0 +1,721 @@
|
|||
services:
|
||||
cassandra:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 800M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 800M
|
||||
environment:
|
||||
JVM_OPTS: -Xms256M -Xmx256M
|
||||
image: docker.io/cassandra:4.1.6
|
||||
ports:
|
||||
- 9042:9042
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- cassandra:/var/lib/cassandra
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '250'
|
||||
- --chunk-overlap
|
||||
- '15'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-azure
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${AZURE_TOKEN}
|
||||
- -e
|
||||
- ${AZURE_ENDPOINT}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-azure
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${AZURE_TOKEN}
|
||||
- -e
|
||||
- ${AZURE_ENDPOINT}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
cassandra: {}
|
||||
grafana-storage: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
722
deploy/docker-compose/tg-launch-azure-neo4j.yaml
Normal file
722
deploy/docker-compose/tg-launch-azure-neo4j.yaml
Normal file
|
|
@ -0,0 +1,722 @@
|
|||
services:
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '250'
|
||||
- --chunk-overlap
|
||||
- '15'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
neo4j:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 768M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 768M
|
||||
environment:
|
||||
NEO4J_AUTH: neo4j/password
|
||||
image: docker.io/neo4j:5.22.0-community-bullseye
|
||||
ports:
|
||||
- 7474:7474
|
||||
- 7687:7687
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- neo4j:/data
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-azure
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${AZURE_TOKEN}
|
||||
- -e
|
||||
- ${AZURE_ENDPOINT}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-azure
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${AZURE_TOKEN}
|
||||
- -e
|
||||
- ${AZURE_ENDPOINT}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
grafana-storage: {}
|
||||
neo4j: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
729
deploy/docker-compose/tg-launch-bedrock-cassandra.yaml
Normal file
729
deploy/docker-compose/tg-launch-bedrock-cassandra.yaml
Normal file
|
|
@ -0,0 +1,729 @@
|
|||
services:
|
||||
cassandra:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 800M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 800M
|
||||
environment:
|
||||
JVM_OPTS: -Xms256M -Xmx256M
|
||||
image: docker.io/cassandra:4.1.6
|
||||
ports:
|
||||
- 9042:9042
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- cassandra:/var/lib/cassandra
|
||||
chunker:
|
||||
command:
|
||||
- chunker-recursive
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '2000'
|
||||
- --chunk-overlap
|
||||
- '100'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-bedrock
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -z
|
||||
- ${AWS_ID_KEY}
|
||||
- -k
|
||||
- ${AWS_SECRET_KEY}
|
||||
- -r
|
||||
- us-west-2
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- mistral.mixtral-8x7b-instruct-v0:1
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-bedrock
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -z
|
||||
- ${AWS_ID_KEY}
|
||||
- -k
|
||||
- ${AWS_SECRET_KEY}
|
||||
- -r
|
||||
- us-west-2
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- mistral.mixtral-8x7b-instruct-v0:1
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
cassandra: {}
|
||||
grafana-storage: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
730
deploy/docker-compose/tg-launch-bedrock-neo4j.yaml
Normal file
730
deploy/docker-compose/tg-launch-bedrock-neo4j.yaml
Normal file
|
|
@ -0,0 +1,730 @@
|
|||
services:
|
||||
chunker:
|
||||
command:
|
||||
- chunker-recursive
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '2000'
|
||||
- --chunk-overlap
|
||||
- '100'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
neo4j:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 768M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 768M
|
||||
environment:
|
||||
NEO4J_AUTH: neo4j/password
|
||||
image: docker.io/neo4j:5.22.0-community-bullseye
|
||||
ports:
|
||||
- 7474:7474
|
||||
- 7687:7687
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- neo4j:/data
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-bedrock
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -z
|
||||
- ${AWS_ID_KEY}
|
||||
- -k
|
||||
- ${AWS_SECRET_KEY}
|
||||
- -r
|
||||
- us-west-2
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- mistral.mixtral-8x7b-instruct-v0:1
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-bedrock
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -z
|
||||
- ${AWS_ID_KEY}
|
||||
- -k
|
||||
- ${AWS_SECRET_KEY}
|
||||
- -r
|
||||
- us-west-2
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- mistral.mixtral-8x7b-instruct-v0:1
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
grafana-storage: {}
|
||||
neo4j: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
717
deploy/docker-compose/tg-launch-claude-cassandra.yaml
Normal file
717
deploy/docker-compose/tg-launch-claude-cassandra.yaml
Normal file
|
|
@ -0,0 +1,717 @@
|
|||
services:
|
||||
cassandra:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 800M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 800M
|
||||
environment:
|
||||
JVM_OPTS: -Xms256M -Xmx256M
|
||||
image: docker.io/cassandra:4.1.6
|
||||
ports:
|
||||
- 9042:9042
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- cassandra:/var/lib/cassandra
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '250'
|
||||
- --chunk-overlap
|
||||
- '15'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-claude
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${CLAUDE_KEY}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-claude
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${CLAUDE_KEY}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
cassandra: {}
|
||||
grafana-storage: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
718
deploy/docker-compose/tg-launch-claude-neo4j.yaml
Normal file
718
deploy/docker-compose/tg-launch-claude-neo4j.yaml
Normal file
|
|
@ -0,0 +1,718 @@
|
|||
services:
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '250'
|
||||
- --chunk-overlap
|
||||
- '15'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
neo4j:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 768M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 768M
|
||||
environment:
|
||||
NEO4J_AUTH: neo4j/password
|
||||
image: docker.io/neo4j:5.22.0-community-bullseye
|
||||
ports:
|
||||
- 7474:7474
|
||||
- 7687:7687
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- neo4j:/data
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-claude
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${CLAUDE_KEY}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-claude
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${CLAUDE_KEY}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
grafana-storage: {}
|
||||
neo4j: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
713
deploy/docker-compose/tg-launch-cohere-cassandra.yaml
Normal file
713
deploy/docker-compose/tg-launch-cohere-cassandra.yaml
Normal file
|
|
@ -0,0 +1,713 @@
|
|||
services:
|
||||
cassandra:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 800M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 800M
|
||||
environment:
|
||||
JVM_OPTS: -Xms256M -Xmx256M
|
||||
image: docker.io/cassandra:4.1.6
|
||||
ports:
|
||||
- 9042:9042
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- cassandra:/var/lib/cassandra
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '150'
|
||||
- --chunk-overlap
|
||||
- '10'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-cohere
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${COHERE_KEY}
|
||||
- -t
|
||||
- 0
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-cohere
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${COHERE_KEY}
|
||||
- -t
|
||||
- 0
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
cassandra: {}
|
||||
grafana-storage: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
714
deploy/docker-compose/tg-launch-cohere-neo4j.yaml
Normal file
714
deploy/docker-compose/tg-launch-cohere-neo4j.yaml
Normal file
|
|
@ -0,0 +1,714 @@
|
|||
services:
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '150'
|
||||
- --chunk-overlap
|
||||
- '10'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
neo4j:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 768M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 768M
|
||||
environment:
|
||||
NEO4J_AUTH: neo4j/password
|
||||
image: docker.io/neo4j:5.22.0-community-bullseye
|
||||
ports:
|
||||
- 7474:7474
|
||||
- 7687:7687
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- neo4j:/data
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-cohere
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${COHERE_KEY}
|
||||
- -t
|
||||
- 0
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-cohere
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${COHERE_KEY}
|
||||
- -t
|
||||
- 0
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
grafana-storage: {}
|
||||
neo4j: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
425
deploy/docker-compose/tg-launch-ollama-cassandra.yaml
Normal file
425
deploy/docker-compose/tg-launch-ollama-cassandra.yaml
Normal file
|
|
@ -0,0 +1,425 @@
|
|||
services:
|
||||
cassandra:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 800M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 800M
|
||||
environment:
|
||||
JVM_OPTS: -Xms256M -Xmx256M
|
||||
image: docker.io/cassandra:4.1.6
|
||||
ports:
|
||||
- 9042:9042
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- cassandra:/var/lib/cassandra
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '250'
|
||||
- --chunk-overlap
|
||||
- '15'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-generic
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-generic
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-ollama
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- gemma2:9b
|
||||
- -r
|
||||
- ${OLLAMA_HOST}
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-ollama
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- gemma2:9b
|
||||
- -r
|
||||
- ${OLLAMA_HOST}
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
cassandra: {}
|
||||
grafana-storage: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
426
deploy/docker-compose/tg-launch-ollama-neo4j.yaml
Normal file
426
deploy/docker-compose/tg-launch-ollama-neo4j.yaml
Normal file
|
|
@ -0,0 +1,426 @@
|
|||
services:
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '250'
|
||||
- --chunk-overlap
|
||||
- '15'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
neo4j:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 768M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 768M
|
||||
environment:
|
||||
NEO4J_AUTH: neo4j/password
|
||||
image: docker.io/neo4j:5.22.0-community-bullseye
|
||||
ports:
|
||||
- 7474:7474
|
||||
- 7687:7687
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- neo4j:/data
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-generic
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-generic
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-ollama
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- gemma2:9b
|
||||
- -r
|
||||
- ${OLLAMA_HOST}
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-ollama
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- gemma2:9b
|
||||
- -r
|
||||
- ${OLLAMA_HOST}
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
grafana-storage: {}
|
||||
neo4j: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
721
deploy/docker-compose/tg-launch-openai-cassandra.yaml
Normal file
721
deploy/docker-compose/tg-launch-openai-cassandra.yaml
Normal file
|
|
@ -0,0 +1,721 @@
|
|||
services:
|
||||
cassandra:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 800M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 800M
|
||||
environment:
|
||||
JVM_OPTS: -Xms256M -Xmx256M
|
||||
image: docker.io/cassandra:4.1.6
|
||||
ports:
|
||||
- 9042:9042
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- cassandra:/var/lib/cassandra
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '250'
|
||||
- --chunk-overlap
|
||||
- '15'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-openai
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${OPENAI_KEY}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- GPT-3.5-Turbo
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-openai
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${OPENAI_KEY}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- GPT-3.5-Turbo
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
cassandra: {}
|
||||
grafana-storage: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
722
deploy/docker-compose/tg-launch-openai-neo4j.yaml
Normal file
722
deploy/docker-compose/tg-launch-openai-neo4j.yaml
Normal file
|
|
@ -0,0 +1,722 @@
|
|||
services:
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '250'
|
||||
- --chunk-overlap
|
||||
- '15'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
neo4j:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 768M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 768M
|
||||
environment:
|
||||
NEO4J_AUTH: neo4j/password
|
||||
image: docker.io/neo4j:5.22.0-community-bullseye
|
||||
ports:
|
||||
- 7474:7474
|
||||
- 7687:7687
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- neo4j:/data
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-openai
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${OPENAI_KEY}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- GPT-3.5-Turbo
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-openai
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- ${OPENAI_KEY}
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- GPT-3.5-Turbo
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
grafana-storage: {}
|
||||
neo4j: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
729
deploy/docker-compose/tg-launch-vertexai-cassandra.yaml
Normal file
729
deploy/docker-compose/tg-launch-vertexai-cassandra.yaml
Normal file
|
|
@ -0,0 +1,729 @@
|
|||
services:
|
||||
cassandra:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 800M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 800M
|
||||
environment:
|
||||
JVM_OPTS: -Xms256M -Xmx256M
|
||||
image: docker.io/cassandra:4.1.6
|
||||
ports:
|
||||
- 9042:9042
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- cassandra:/var/lib/cassandra
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '250'
|
||||
- --chunk-overlap
|
||||
- '15'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-vertexai
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- /vertexai/private.json
|
||||
- -r
|
||||
- us-central1
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- gemini-1.0-pro-001
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 256M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./vertexai:/vertexai
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-vertexai
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- /vertexai/private.json
|
||||
- -r
|
||||
- us-central1
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- gemini-1.0-pro-001
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 256M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./vertexai:/vertexai
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
cassandra: {}
|
||||
grafana-storage: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
730
deploy/docker-compose/tg-launch-vertexai-neo4j.yaml
Normal file
730
deploy/docker-compose/tg-launch-vertexai-neo4j.yaml
Normal file
|
|
@ -0,0 +1,730 @@
|
|||
services:
|
||||
chunker:
|
||||
command:
|
||||
- chunker-token
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --chunk-size
|
||||
- '250'
|
||||
- --chunk-overlap
|
||||
- '15'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
embeddings:
|
||||
command:
|
||||
- embeddings-hf
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -m
|
||||
- all-MiniLM-L6-v2
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 400M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
graph-rag:
|
||||
command:
|
||||
- graph-rag
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --prompt-request-queue
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- --prompt-response-queue
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --entity-limit
|
||||
- '50'
|
||||
- --triple-limit
|
||||
- '30'
|
||||
- --max-subgraph-size
|
||||
- '3000'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
kg-extract-definitions:
|
||||
command:
|
||||
- kg-extract-definitions
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
kg-extract-relationships:
|
||||
command:
|
||||
- kg-extract-relationships
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
neo4j:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 768M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 768M
|
||||
environment:
|
||||
NEO4J_AUTH: neo4j/password
|
||||
image: docker.io/neo4j:5.22.0-community-bullseye
|
||||
ports:
|
||||
- 7474:7474
|
||||
- 7687:7687
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- neo4j:/data
|
||||
pdf-decoder:
|
||||
command:
|
||||
- pdf-decoder
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
prompt:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
prompt-rag:
|
||||
command:
|
||||
- prompt-template
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -i
|
||||
- non-persistent://tg/request/prompt-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/prompt-rag-response
|
||||
- --text-completion-request-queue
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- --text-completion-response-queue
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
- --definition-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive definitions for any discovered entities.
|
||||
|
||||
Do not provide definitions for entities whose definitions are incomplete
|
||||
|
||||
or unknown.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- entity: the name of the entity
|
||||
|
||||
- definition: English text which defines the entity
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract will be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes. Do not include null or unknown definitions.
|
||||
|
||||
</requirements>'
|
||||
- --relationship-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive entity relationships. For each
|
||||
|
||||
relationship, derive the subject, predicate and object of the relationship.
|
||||
|
||||
Output relationships in JSON format as an arary of objects with fields:
|
||||
|
||||
- subject: the subject of the relationship
|
||||
|
||||
- predicate: the predicate
|
||||
|
||||
- object: the object of the relationship
|
||||
|
||||
- object-entity: false if the object is a simple data type: name, value or date. true
|
||||
if it is an entity.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not use special characters in the abstract text. The
|
||||
|
||||
abstract must be written as plain text. Do not add markdown formatting
|
||||
|
||||
or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
- --knowledge-query-template
|
||||
- 'Study the following set of knowledge statements. The statements are written
|
||||
in Cypher format that has been extracted from a knowledge graph. Use only the
|
||||
provided set of knowledge statements in your response. Do not speculate if the
|
||||
answer is not found in the provided set of knowledge statements.
|
||||
|
||||
|
||||
Here''s the knowledge statements:
|
||||
|
||||
{graph}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --document-query-template
|
||||
- 'Study the following context. Use only the information provided in the context
|
||||
in your response. Do not speculate if the answer is not found in the provided
|
||||
set of knowledge statements.
|
||||
|
||||
|
||||
Here is the context:
|
||||
|
||||
{documents}
|
||||
|
||||
|
||||
Use only the provided knowledge statements to respond to the following:
|
||||
|
||||
{query}
|
||||
|
||||
'
|
||||
- --rows-template
|
||||
- '<instructions>
|
||||
|
||||
Study the following text and derive objects which match the schema provided.
|
||||
|
||||
|
||||
You must output an array of JSON objects for each object you discover
|
||||
|
||||
which matches the schema. For each object, output a JSON object whose fields
|
||||
|
||||
carry the name field specified in the schema.
|
||||
|
||||
</instructions>
|
||||
|
||||
|
||||
<schema>
|
||||
|
||||
{schema}
|
||||
|
||||
</schema>
|
||||
|
||||
|
||||
<text>
|
||||
|
||||
{text}
|
||||
|
||||
</text>
|
||||
|
||||
|
||||
<requirements>
|
||||
|
||||
You will respond only with raw JSON format data. Do not provide
|
||||
|
||||
explanations. Do not add markdown formatting or headers or prefixes.
|
||||
|
||||
</requirements>'
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
text-completion:
|
||||
command:
|
||||
- text-completion-vertexai
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- /vertexai/private.json
|
||||
- -r
|
||||
- us-central1
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- gemini-1.0-pro-001
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 256M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./vertexai:/vertexai
|
||||
text-completion-rag:
|
||||
command:
|
||||
- text-completion-vertexai
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -k
|
||||
- /vertexai/private.json
|
||||
- -r
|
||||
- us-central1
|
||||
- -x
|
||||
- '4096'
|
||||
- -t
|
||||
- '0'
|
||||
- -m
|
||||
- gemini-1.0-pro-001
|
||||
- -i
|
||||
- non-persistent://tg/request/text-completion-rag
|
||||
- -o
|
||||
- non-persistent://tg/response/text-completion-rag-response
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 256M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./vertexai:/vertexai
|
||||
vectorize:
|
||||
command:
|
||||
- embeddings-vectorize
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
grafana-storage: {}
|
||||
neo4j: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
220
deploy/docker-compose/tg-storage-cassandra.yaml
Normal file
220
deploy/docker-compose/tg-storage-cassandra.yaml
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
services:
|
||||
cassandra:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 800M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 800M
|
||||
environment:
|
||||
JVM_OPTS: -Xms256M -Xmx256M
|
||||
image: docker.io/cassandra:4.1.6
|
||||
ports:
|
||||
- 9042:9042
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- cassandra:/var/lib/cassandra
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 512M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-cassandra
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- cassandra
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
cassandra: {}
|
||||
grafana-storage: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
221
deploy/docker-compose/tg-storage-neo4j.yaml
Normal file
221
deploy/docker-compose/tg-storage-neo4j.yaml
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
services:
|
||||
grafana:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
environment:
|
||||
GF_ORG_NAME: trustgraph.ai
|
||||
image: docker.io/grafana/grafana:11.1.4
|
||||
ports:
|
||||
- 3000:3000
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- grafana-storage:/var/lib/grafana
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/dashboards/
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/datasources/
|
||||
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
|
||||
init-pulsar:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg
|
||||
; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin
|
||||
--admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url
|
||||
http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response;
|
||||
sleep 20; done
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 400M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 400M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
restart: on-failure:100
|
||||
neo4j:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 768M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 768M
|
||||
environment:
|
||||
NEO4J_AUTH: neo4j/password
|
||||
image: docker.io/neo4j:5.22.0-community-bullseye
|
||||
ports:
|
||||
- 7474:7474
|
||||
- 7687:7687
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- neo4j:/data
|
||||
prometheus:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/prom/prometheus:v2.53.2
|
||||
ports:
|
||||
- 9090:9090
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- ./prometheus:/etc/prometheus/
|
||||
- prometheus-data:/prometheus
|
||||
pulsar:
|
||||
command:
|
||||
- bin/pulsar
|
||||
- standalone
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 1500M
|
||||
reservations:
|
||||
cpus: '1.0'
|
||||
memory: 1500M
|
||||
environment:
|
||||
PULSAR_MEM: -Xms600M -Xmx600M
|
||||
image: docker.io/apachepulsar/pulsar:3.3.1
|
||||
ports:
|
||||
- 6650:6650
|
||||
- 8080:8080
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- pulsar-data:/pulsar/data
|
||||
qdrant:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
image: docker.io/qdrant/qdrant:v1.11.1
|
||||
ports:
|
||||
- 6333:6333
|
||||
- 6334:6334
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
query-doc-embeddings:
|
||||
command:
|
||||
- de-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-graph-embeddings:
|
||||
command:
|
||||
- ge-query-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
query-triples:
|
||||
command:
|
||||
- triples-query-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-doc-embeddings:
|
||||
command:
|
||||
- de-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-graph-embeddings:
|
||||
command:
|
||||
- ge-write-qdrant
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -t
|
||||
- http://qdrant:6333
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
store-triples:
|
||||
command:
|
||||
- triples-write-neo4j
|
||||
- -p
|
||||
- pulsar://pulsar:6650
|
||||
- -g
|
||||
- bolt://neo4j:7687
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 128M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
image: docker.io/trustgraph/trustgraph-flow:0.10.0
|
||||
restart: on-failure:100
|
||||
volumes:
|
||||
grafana-storage: {}
|
||||
neo4j: {}
|
||||
prometheus-data: {}
|
||||
pulsar-data: {}
|
||||
qdrant: {}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue