diff --git a/Makefile b/Makefile index 1f710b5c..b07e3dc8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # VERSION=$(shell git describe | sed 's/^v//') -VERSION=0.7.16 +VERSION=0.7.17 DOCKER=podman diff --git a/scripts/de-query-milvus b/scripts/de-query-milvus new file mode 100755 index 00000000..15e237c3 --- /dev/null +++ b/scripts/de-query-milvus @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +from trustgraph.query.doc_embeddings.milvus import run + +run() + diff --git a/scripts/de-write-milvus b/scripts/de-write-milvus new file mode 100755 index 00000000..644674d0 --- /dev/null +++ b/scripts/de-write-milvus @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +from trustgraph.storage.doc_embeddings.milvus import run + +run() + diff --git a/scripts/document-rag b/scripts/document-rag new file mode 100755 index 00000000..e4cf5401 --- /dev/null +++ b/scripts/document-rag @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +from trustgraph.retrieval.document_rag import run + +run() + diff --git a/setup.py b/setup.py index 5bccd024..2f6a11f0 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import os with open("README.md", "r") as fh: long_description = fh.read() -version = "0.7.16" +version = "0.7.17" setuptools.setup( name="trustgraph", @@ -55,6 +55,9 @@ setuptools.setup( "scripts/chunker-recursive", "scripts/chunker-token", "scripts/concat-parquet", + "scripts/de-query-milvus", + "scripts/de-write-milvus", + "scripts/document-rag", "scripts/dump-parquet", "scripts/embeddings-hf", "scripts/embeddings-ollama", diff --git a/templates/components/milvus.jsonnet b/templates/components/milvus.jsonnet index 6a171ad7..90518e0f 100644 --- a/templates/components/milvus.jsonnet +++ b/templates/components/milvus.jsonnet @@ -53,8 +53,59 @@ milvus + { }, }, +/* + +// Document embeddings writer & query service. Not currently enabled. + + "store-doc-embeddings": base + { + image: images.trustgraph, + command: [ + "de-write-milvus", + "-p", + url.pulsar, + "-t", + url.milvus, + ], + deploy: { + resources: { + limits: { + cpus: '0.5', + memory: '128M' + }, + reservations: { + cpus: '0.1', + memory: '128M' + } + } + }, + }, + + "query-doc-embeddings": base + { + image: images.trustgraph, + command: [ + "de-query-milvus", + "-p", + url.pulsar, + "-t", + url.milvus, + ], + deploy: { + resources: { + limits: { + cpus: '0.5', + memory: '128M' + }, + reservations: { + cpus: '0.1', + memory: '128M' + } + } + }, + }, + +*/ + } } - diff --git a/templates/prompts/gemini.jsonnet b/templates/prompts/gemini.jsonnet index ec85816d..5fb19a1c 100644 --- a/templates/prompts/gemini.jsonnet +++ b/templates/prompts/gemini.jsonnet @@ -60,6 +60,8 @@ local url = import "../components/url.jsonnet"; "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n", "--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.\n\nHere's the knowledge statements:\n{graph}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", + "--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.\n\nHere is the context:\n{documents}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", ], deploy: { resources: { diff --git a/templates/prompts/mixtral.jsonnet b/templates/prompts/mixtral.jsonnet index 7e74b2ef..33984033 100644 --- a/templates/prompts/mixtral.jsonnet +++ b/templates/prompts/mixtral.jsonnet @@ -60,6 +60,8 @@ local url = import "../components/url.jsonnet"; "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n", "--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.\n\nHere's the knowledge statements:\n{graph}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", + "--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.\n\nHere is the context:\n{documents}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", ], deploy: { resources: { diff --git a/templates/prompts/openai.jsonnet b/templates/prompts/openai.jsonnet index 55fe2a14..edc41a37 100644 --- a/templates/prompts/openai.jsonnet +++ b/templates/prompts/openai.jsonnet @@ -60,6 +60,8 @@ local url = import "../components/url.jsonnet"; "\nStudy the following text and derive entity relationships. For each\nrelationship, derive the subject, predicate and object of the relationship.\nOutput relationships in JSON format as an arary of objects with fields:\n- subject: the subject of the relationship\n- predicate: the predicate\n- object: the object of the relationship\n- object-entity: false if the object is a simple data type: name, value or date. true if it is an entity.\n\n\n\n{text}\n\n\n\nYou will respond only with raw JSON format data. Do not provide\nexplanations. Do not use special characters in the abstract text. The\nabstract must be written as plain text. Do not add markdown formatting\nor headers or prefixes.\n", "--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.\n\nHere's the knowledge statements:\n{graph}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", + "--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.\n\nHere is the context:\n{documents}\n\nUse only the provided knowledge statements to respond to the following:\n{query}\n", ], deploy: { resources: { diff --git a/tests/test-doc-embeddings b/tests/test-doc-embeddings new file mode 100755 index 00000000..163af0dc --- /dev/null +++ b/tests/test-doc-embeddings @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 + +import pulsar +from trustgraph.clients.document_embeddings_client import DocumentEmbeddingsClient +from trustgraph.clients.embeddings_client import EmbeddingsClient + +ec = EmbeddingsClient(pulsar_host="pulsar://localhost:6650") + +vectors = ec.request("What caused the space shuttle to explode?") + +print(vectors) + +llm = DocumentEmbeddingsClient(pulsar_host="pulsar://localhost:6650") + +limit=10 + +resp = llm.request(vectors, limit) + +print("Response...") +for val in resp: + print(val) + diff --git a/tests/test-doc-prompt b/tests/test-doc-prompt new file mode 100755 index 00000000..aa59a62b --- /dev/null +++ b/tests/test-doc-prompt @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 + +import pulsar +from trustgraph.clients.prompt_client import PromptClient + +p = PromptClient(pulsar_host="pulsar://localhost:6650") + +docs = [ + "In our house there is a big cat and a small cat.", + "The small cat is black.", + "The big cat is called Fred.", + "The orange stripey cat is big.", + "The black cat pounces on the big cat.", + "The black cat is called Hope." +] + +query="What is the name of the cat who pounces on Fred? Provide a full explanation." + +resp = p.request_document_prompt( + query=query, + documents=docs, +) + +print(resp) + diff --git a/tests/test-doc-rag b/tests/test-doc-rag new file mode 100755 index 00000000..dfb731f2 --- /dev/null +++ b/tests/test-doc-rag @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import pulsar +from trustgraph.clients.document_rag_client import DocumentRagClient + +rag = DocumentRagClient(pulsar_host="pulsar://localhost:6650") + +query=""" +This knowledge graph describes the Space Shuttle disaster. +Present 20 facts which are present in the knowledge graph.""" + +resp = rag.request(query) + +print(resp) + diff --git a/tg-launch-azure-cassandra.yaml b/tg-launch-azure-cassandra.yaml index 8ab15406..f82d566c 100644 --- a/tg-launch-azure-cassandra.yaml +++ b/tg-launch-azure-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -280,7 +280,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -316,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -369,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -386,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -403,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -420,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -443,7 +443,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -470,7 +470,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -485,7 +485,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-azure-neo4j.yaml b/tg-launch-azure-neo4j.yaml index 01d6e866..132da5e4 100644 --- a/tg-launch-azure-neo4j.yaml +++ b/tg-launch-azure-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -281,7 +281,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -317,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -370,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -387,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -404,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -421,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -444,7 +444,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -471,7 +471,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -486,7 +486,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-bedrock-cassandra.yaml b/tg-launch-bedrock-cassandra.yaml index 1b32a9ba..94e6241a 100644 --- a/tg-launch-bedrock-cassandra.yaml +++ b/tg-launch-bedrock-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -280,7 +280,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -316,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -369,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -386,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -403,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -420,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -447,7 +447,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -478,7 +478,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -493,7 +493,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-bedrock-neo4j.yaml b/tg-launch-bedrock-neo4j.yaml index 85c9941f..6d880622 100644 --- a/tg-launch-bedrock-neo4j.yaml +++ b/tg-launch-bedrock-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -281,7 +281,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -317,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -370,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -387,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -404,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -421,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -448,7 +448,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -479,7 +479,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -494,7 +494,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-claude-cassandra.yaml b/tg-launch-claude-cassandra.yaml index b4850acd..a90622b5 100644 --- a/tg-launch-claude-cassandra.yaml +++ b/tg-launch-claude-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -280,7 +280,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -316,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -369,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -386,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -403,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -420,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -441,7 +441,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -466,7 +466,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -481,7 +481,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-claude-neo4j.yaml b/tg-launch-claude-neo4j.yaml index dee4748c..c4a9b02f 100644 --- a/tg-launch-claude-neo4j.yaml +++ b/tg-launch-claude-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -281,7 +281,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -317,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -370,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -387,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -404,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -421,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -442,7 +442,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -467,7 +467,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -482,7 +482,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-cohere-cassandra.yaml b/tg-launch-cohere-cassandra.yaml index dc119456..ddd089b4 100644 --- a/tg-launch-cohere-cassandra.yaml +++ b/tg-launch-cohere-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -280,7 +280,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -316,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -369,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -386,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -403,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -420,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -439,7 +439,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -462,7 +462,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -477,7 +477,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-cohere-neo4j.yaml b/tg-launch-cohere-neo4j.yaml index df5fc789..a8a192ec 100644 --- a/tg-launch-cohere-neo4j.yaml +++ b/tg-launch-cohere-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -281,7 +281,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -317,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -370,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -387,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -404,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -421,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -440,7 +440,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -463,7 +463,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -478,7 +478,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-ollama-cassandra.yaml b/tg-launch-ollama-cassandra.yaml index 12ae1c1c..c475527b 100644 --- a/tg-launch-ollama-cassandra.yaml +++ b/tg-launch-ollama-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -267,7 +267,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -290,7 +290,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -343,7 +343,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -360,7 +360,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -377,7 +377,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -394,7 +394,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -413,7 +413,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -436,7 +436,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -451,7 +451,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-ollama-neo4j.yaml b/tg-launch-ollama-neo4j.yaml index f59adebf..f5a76f57 100644 --- a/tg-launch-ollama-neo4j.yaml +++ b/tg-launch-ollama-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -268,7 +268,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -291,7 +291,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -344,7 +344,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -361,7 +361,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -378,7 +378,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -395,7 +395,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -414,7 +414,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -437,7 +437,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -452,7 +452,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-openai-cassandra.yaml b/tg-launch-openai-cassandra.yaml index 721ee64b..65f75dc0 100644 --- a/tg-launch-openai-cassandra.yaml +++ b/tg-launch-openai-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -280,7 +280,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -316,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -369,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -386,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -403,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -420,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -441,7 +441,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -466,7 +466,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -481,7 +481,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-openai-neo4j.yaml b/tg-launch-openai-neo4j.yaml index 2f996070..357854ce 100644 --- a/tg-launch-openai-neo4j.yaml +++ b/tg-launch-openai-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -281,7 +281,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -317,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -370,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -387,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -404,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -421,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -442,7 +442,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion-rag": "command": @@ -467,7 +467,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "vectorize": "command": @@ -482,7 +482,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-launch-vertexai-cassandra.yaml b/tg-launch-vertexai-cassandra.yaml index fb614f9c..b5b23e9d 100644 --- a/tg-launch-vertexai-cassandra.yaml +++ b/tg-launch-vertexai-cassandra.yaml @@ -33,7 +33,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -50,7 +50,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -122,7 +122,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -155,7 +155,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -170,7 +170,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -232,7 +232,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -280,7 +280,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -316,7 +316,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -369,7 +369,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -386,7 +386,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -403,7 +403,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -420,7 +420,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -443,7 +443,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -472,7 +472,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -489,7 +489,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-launch-vertexai-neo4j.yaml b/tg-launch-vertexai-neo4j.yaml index 95e834cf..d9894907 100644 --- a/tg-launch-vertexai-neo4j.yaml +++ b/tg-launch-vertexai-neo4j.yaml @@ -16,7 +16,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "embeddings": "command": @@ -33,7 +33,7 @@ "reservations": "cpus": "0.5" "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "etcd": "command": @@ -105,7 +105,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "init-pulsar": "command": @@ -138,7 +138,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "kg-extract-relationships": "command": @@ -153,7 +153,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "milvus": "command": @@ -233,7 +233,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prometheus": "deploy": @@ -281,7 +281,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "prompt-rag": "command": @@ -317,7 +317,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -370,7 +370,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -387,7 +387,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -404,7 +404,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -421,7 +421,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "text-completion": "command": @@ -444,7 +444,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -473,7 +473,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -490,7 +490,7 @@ "reservations": "cpus": "0.5" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/tg-storage-cassandra.yaml b/tg-storage-cassandra.yaml index 53c300f0..08997ca1 100644 --- a/tg-storage-cassandra.yaml +++ b/tg-storage-cassandra.yaml @@ -195,7 +195,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -212,7 +212,7 @@ "reservations": "cpus": "0.1" "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -229,7 +229,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -246,7 +246,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/tg-storage-neo4j.yaml b/tg-storage-neo4j.yaml index e91289cd..ad188310 100644 --- a/tg-storage-neo4j.yaml +++ b/tg-storage-neo4j.yaml @@ -196,7 +196,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "query-triples": "command": @@ -213,7 +213,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -230,7 +230,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "store-triples": "command": @@ -247,7 +247,7 @@ "reservations": "cpus": "0.1" "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.16" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.17" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/trustgraph/base/consumer.py b/trustgraph/base/consumer.py index 0c975cf5..a7e5e041 100644 --- a/trustgraph/base/consumer.py +++ b/trustgraph/base/consumer.py @@ -65,7 +65,7 @@ class Consumer(BaseProcessor): self.consumer.negative_acknowledge(msg) print("TooManyRequests: will retry") __class__.processing_metric.labels(status="rate-limit").inc() - time.sleep(5) + time.sleep(2) continue except Exception as e: diff --git a/trustgraph/base/consumer_producer.py b/trustgraph/base/consumer_producer.py index 3f9d0f4f..35bf6be2 100644 --- a/trustgraph/base/consumer_producer.py +++ b/trustgraph/base/consumer_producer.py @@ -84,7 +84,7 @@ class ConsumerProducer(BaseProcessor): self.consumer.negative_acknowledge(msg) print("TooManyRequests: will retry") __class__.processing_metric.labels(status="rate-limit").inc() - time.sleep(5) + time.sleep(2) continue except Exception as e: diff --git a/trustgraph/clients/document_embeddings_client.py b/trustgraph/clients/document_embeddings_client.py new file mode 100644 index 00000000..d432991d --- /dev/null +++ b/trustgraph/clients/document_embeddings_client.py @@ -0,0 +1,45 @@ + +import _pulsar + +from .. schema import DocumentEmbeddingsRequest, DocumentEmbeddingsResponse +from .. schema import document_embeddings_request_queue +from .. schema import document_embeddings_response_queue +from . base import BaseClient + +# Ugly +ERROR=_pulsar.LoggerLevel.Error +WARN=_pulsar.LoggerLevel.Warn +INFO=_pulsar.LoggerLevel.Info +DEBUG=_pulsar.LoggerLevel.Debug + +class DocumentEmbeddingsClient(BaseClient): + + def __init__( + self, log_level=ERROR, + subscriber=None, + input_queue=None, + output_queue=None, + pulsar_host="pulsar://pulsar:6650", + ): + + if input_queue == None: + input_queue = document_embeddings_request_queue + + if output_queue == None: + output_queue = document_embeddings_response_queue + + super(DocumentEmbeddingsClient, self).__init__( + log_level=log_level, + subscriber=subscriber, + input_queue=input_queue, + output_queue=output_queue, + pulsar_host=pulsar_host, + input_schema=DocumentEmbeddingsRequest, + output_schema=DocumentEmbeddingsResponse, + ) + + def request(self, vectors, limit=10, timeout=300): + return self.call( + vectors=vectors, limit=limit, timeout=timeout + ).documents + diff --git a/trustgraph/clients/document_rag_client.py b/trustgraph/clients/document_rag_client.py new file mode 100644 index 00000000..1e8a706d --- /dev/null +++ b/trustgraph/clients/document_rag_client.py @@ -0,0 +1,46 @@ + +import _pulsar + +from .. schema import DocumentRagQuery, DocumentRagResponse +from .. schema import document_rag_request_queue, document_rag_response_queue +from . base import BaseClient + +# Ugly +ERROR=_pulsar.LoggerLevel.Error +WARN=_pulsar.LoggerLevel.Warn +INFO=_pulsar.LoggerLevel.Info +DEBUG=_pulsar.LoggerLevel.Debug + +class DocumentRagClient(BaseClient): + + def __init__( + self, + log_level=ERROR, + subscriber=None, + input_queue=None, + output_queue=None, + pulsar_host="pulsar://pulsar:6650", + ): + + if input_queue == None: + input_queue = document_rag_request_queue + + if output_queue == None: + output_queue = document_rag_response_queue + + super(DocumentRagClient, self).__init__( + log_level=log_level, + subscriber=subscriber, + input_queue=input_queue, + output_queue=output_queue, + pulsar_host=pulsar_host, + input_schema=DocumentRagQuery, + output_schema=DocumentRagResponse, + ) + + def request(self, query, timeout=500): + + return self.call( + query=query, timeout=timeout + ).response + diff --git a/trustgraph/clients/prompt_client.py b/trustgraph/clients/prompt_client.py index c8fea1a4..13f36c67 100644 --- a/trustgraph/clients/prompt_client.py +++ b/trustgraph/clients/prompt_client.py @@ -64,3 +64,12 @@ class PromptClient(BaseClient): timeout=timeout ).answer + def request_document_prompt(self, query, documents, timeout=300): + + return self.call( + kind="document-prompt", + query=query, + documents=documents, + timeout=timeout + ).answer + diff --git a/trustgraph/direct/milvus_doc_embeddings.py b/trustgraph/direct/milvus_doc_embeddings.py new file mode 100644 index 00000000..9904f6ce --- /dev/null +++ b/trustgraph/direct/milvus_doc_embeddings.py @@ -0,0 +1,138 @@ + +from pymilvus import MilvusClient, CollectionSchema, FieldSchema, DataType +import time + +class DocVectors: + + def __init__(self, uri="http://localhost:19530", prefix='doc'): + + self.client = MilvusClient(uri=uri) + + # Strategy is to create collections per dimension. Probably only + # going to be using 1 anyway, but that means we don't need to + # hard-code the dimension anywhere, and no big deal if more than + # one are created. + self.collections = {} + + self.prefix = prefix + + # Time between reloads + self.reload_time = 90 + + # Next time to reload - this forces a reload at next window + self.next_reload = time.time() + self.reload_time + print("Reload at", self.next_reload) + + def init_collection(self, dimension): + + collection_name = self.prefix + "_" + str(dimension) + + pkey_field = FieldSchema( + name="id", + dtype=DataType.INT64, + is_primary=True, + auto_id=True, + ) + + vec_field = FieldSchema( + name="vector", + dtype=DataType.FLOAT_VECTOR, + dim=dimension, + ) + + doc_field = FieldSchema( + name="doc", + dtype=DataType.VARCHAR, + max_length=65535, + ) + + schema = CollectionSchema( + fields = [pkey_field, vec_field, doc_field], + description = "Document embedding schema", + ) + + self.client.create_collection( + collection_name=collection_name, + schema=schema, + metric_type="COSINE", + ) + + index_params = MilvusClient.prepare_index_params() + + index_params.add_index( + field_name="vector", + metric_type="COSINE", + index_type="IVF_SQ8", + index_name="vector_index", + params={ "nlist": 128 } + ) + + self.client.create_index( + collection_name=collection_name, + index_params=index_params + ) + + self.collections[dimension] = collection_name + + def insert(self, embeds, doc): + + dim = len(embeds) + + if dim not in self.collections: + self.init_collection(dim) + + data = [ + { + "vector": embeds, + "doc": doc, + } + ] + + self.client.insert( + collection_name=self.collections[dim], + data=data + ) + + def search(self, embeds, fields=["doc"], limit=10): + + dim = len(embeds) + + if dim not in self.collections: + self.init_collection(dim) + + coll = self.collections[dim] + + search_params = { + "metric_type": "COSINE", + "params": { + "radius": 0.1, + "range_filter": 0.8 + } + } + + print("Loading...") + self.client.load_collection( + collection_name=coll, + ) + + print("Searching...") + + res = self.client.search( + collection_name=coll, + data=[embeds], + limit=limit, + output_fields=fields, + search_params=search_params, + )[0] + + + # If reload time has passed, unload collection + if time.time() > self.next_reload: + print("Unloading, reload at", self.next_reload) + self.client.release_collection( + collection_name=coll, + ) + self.next_reload = time.time() + self.reload_time + + return res + diff --git a/trustgraph/direct/milvus.py b/trustgraph/direct/milvus_graph_embeddings.py similarity index 93% rename from trustgraph/direct/milvus.py rename to trustgraph/direct/milvus_graph_embeddings.py index f80004b3..ce81a212 100644 --- a/trustgraph/direct/milvus.py +++ b/trustgraph/direct/milvus_graph_embeddings.py @@ -2,9 +2,9 @@ from pymilvus import MilvusClient, CollectionSchema, FieldSchema, DataType import time -class TripleVectors: +class EntityVectors: - def __init__(self, uri="http://localhost:19530"): + def __init__(self, uri="http://localhost:19530", prefix='entity'): self.client = MilvusClient(uri=uri) @@ -14,6 +14,8 @@ class TripleVectors: # one are created. self.collections = {} + self.prefix = prefix + # Time between reloads self.reload_time = 90 @@ -23,7 +25,7 @@ class TripleVectors: def init_collection(self, dimension): - collection_name = "triples_" + str(dimension) + collection_name = self.prefix + "_" + str(dimension) pkey_field = FieldSchema( name="id", @@ -46,7 +48,7 @@ class TripleVectors: schema = CollectionSchema( fields = [pkey_field, vec_field, entity_field], - description = "Edge map schema", + description = "Graph embedding schema", ) self.client.create_collection( diff --git a/trustgraph/document_rag.py b/trustgraph/document_rag.py new file mode 100644 index 00000000..61da645b --- /dev/null +++ b/trustgraph/document_rag.py @@ -0,0 +1,132 @@ + +from . clients.document_embeddings_client import DocumentEmbeddingsClient +from . clients.triples_query_client import TriplesQueryClient +from . clients.embeddings_client import EmbeddingsClient +from . clients.prompt_client import PromptClient + +from . schema import DocumentEmbeddingsRequest, DocumentEmbeddingsResponse +from . schema import TriplesQueryRequest, TriplesQueryResponse +from . schema import prompt_request_queue +from . schema import prompt_response_queue +from . schema import embeddings_request_queue +from . schema import embeddings_response_queue +from . schema import document_embeddings_request_queue +from . schema import document_embeddings_response_queue + +LABEL="http://www.w3.org/2000/01/rdf-schema#label" +DEFINITION="http://www.w3.org/2004/02/skos/core#definition" + +class DocumentRag: + + def __init__( + self, + pulsar_host="pulsar://pulsar:6650", + pr_request_queue=None, + pr_response_queue=None, + emb_request_queue=None, + emb_response_queue=None, + de_request_queue=None, + de_response_queue=None, + verbose=False, + module="test", + ): + + self.verbose=verbose + + if pr_request_queue is None: + pr_request_queue = prompt_request_queue + + if pr_response_queue is None: + pr_response_queue = prompt_response_queue + + if emb_request_queue is None: + emb_request_queue = embeddings_request_queue + + if emb_response_queue is None: + emb_response_queue = embeddings_response_queue + + if de_request_queue is None: + de_request_queue = document_embeddings_request_queue + + if de_response_queue is None: + de_response_queue = document_embeddings_response_queue + + if self.verbose: + print("Initialising...", flush=True) + + # FIXME: Configurable + self.entity_limit = 20 + + self.de_client = DocumentEmbeddingsClient( + pulsar_host=pulsar_host, + subscriber=module + "-de", + input_queue=de_request_queue, + output_queue=de_response_queue, + ) + + self.embeddings = EmbeddingsClient( + pulsar_host=pulsar_host, + input_queue=emb_request_queue, + output_queue=emb_response_queue, + subscriber=module + "-emb", + ) + + self.lang = PromptClient( + pulsar_host=pulsar_host, + input_queue=prompt_request_queue, + output_queue=prompt_response_queue, + subscriber=module + "-de-prompt", + ) + + if self.verbose: + print("Initialised", flush=True) + + def get_vector(self, query): + + if self.verbose: + print("Compute embeddings...", flush=True) + + qembeds = self.embeddings.request(query) + + if self.verbose: + print("Done.", flush=True) + + return qembeds + + def get_docs(self, query): + + vectors = self.get_vector(query) + + if self.verbose: + print("Get entities...", flush=True) + + docs = self.de_client.request( + vectors, self.entity_limit + ) + + if self.verbose: + print("Docs:", flush=True) + for doc in docs: + print(doc, flush=True) + + return docs + + def query(self, query): + + if self.verbose: + print("Construct prompt...", flush=True) + + docs = self.get_docs(query) + + if self.verbose: + print("Invoke LLM...", flush=True) + print(docs) + print(query) + + resp = self.lang.request_document_prompt(query, docs) + + if self.verbose: + print("Done", flush=True) + + return resp + diff --git a/trustgraph/model/prompt/generic/prompts.py b/trustgraph/model/prompt/generic/prompts.py index ac58f4cb..3d21bf79 100644 --- a/trustgraph/model/prompt/generic/prompts.py +++ b/trustgraph/model/prompt/generic/prompts.py @@ -79,3 +79,18 @@ Use only the provided knowledge statements to respond to the following: """ return prompt + +def to_document_query(query, documents): + + documents = "\n\n".join(documents) + + prompt=f"""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} +""" + + return prompt diff --git a/trustgraph/model/prompt/generic/service.py b/trustgraph/model/prompt/generic/service.py index 27dbd6fb..7f52201d 100755 --- a/trustgraph/model/prompt/generic/service.py +++ b/trustgraph/model/prompt/generic/service.py @@ -1,4 +1,3 @@ - """ Language service abstracts prompt engineering from LLM. """ @@ -14,7 +13,8 @@ from .... schema import prompt_request_queue, prompt_response_queue from .... base import ConsumerProducer from .... clients.llm_client import LlmClient -from . prompts import to_definitions, to_relationships, to_kg_query +from . prompts import to_definitions, to_relationships +from . prompts import to_kg_query, to_document_query module = ".".join(__name__.split(".")[1:-1]) @@ -82,6 +82,11 @@ class Processor(ConsumerProducer): self.handle_kg_prompt(id, v) return + elif kind == "document-prompt": + + self.handle_document_prompt(id, v) + return + else: print("Invalid kind.", flush=True) @@ -252,6 +257,43 @@ class Processor(ConsumerProducer): self.producer.send(r, properties={"id": id}) + def handle_document_prompt(self, id, v): + + try: + + prompt = to_document_query(v.query, v.documents) + + print("prompt") + print(prompt) + + print("Call LLM...") + + ans = self.llm.request(prompt) + + print(ans) + + print("Send response...", flush=True) + r = PromptResponse(answer=ans, error=None) + self.producer.send(r, properties={"id": id}) + + print("Done.", flush=True) + + except Exception as e: + + print(f"Exception: {e}") + + print("Send error response...", flush=True) + + r = PromptResponse( + error=Error( + type = "llm-error", + message = str(e), + ), + response=None, + ) + + self.producer.send(r, properties={"id": id}) + @staticmethod def add_args(parser): diff --git a/trustgraph/model/prompt/template/prompts.py b/trustgraph/model/prompt/template/prompts.py index 16401a50..232bbacc 100644 --- a/trustgraph/model/prompt/template/prompts.py +++ b/trustgraph/model/prompt/template/prompts.py @@ -17,3 +17,7 @@ def to_kg_query(template, query, kg): cypher = get_cypher(kg) return template.format(query=query, graph=cypher) +def to_document_query(template, query, docs): + docs = "\n\n".join(docs) + return template.format(query=query, documents=docs) + diff --git a/trustgraph/model/prompt/template/service.py b/trustgraph/model/prompt/template/service.py index 644c8596..febaab85 100755 --- a/trustgraph/model/prompt/template/service.py +++ b/trustgraph/model/prompt/template/service.py @@ -14,7 +14,8 @@ from .... schema import prompt_request_queue, prompt_response_queue from .... base import ConsumerProducer from .... clients.llm_client import LlmClient -from . prompts import to_definitions, to_relationships, to_kg_query +from . prompts import to_definitions, to_relationships +from . prompts import to_kg_query, to_document_query module = ".".join(__name__.split(".")[1:-1]) @@ -38,6 +39,7 @@ class Processor(ConsumerProducer): definition_template = params.get("definition_template") relationship_template = params.get("relationship_template") knowledge_query_template = params.get("knowledge_query_template") + document_query_template = params.get("document_query_template") super(Processor, self).__init__( **params | { @@ -48,9 +50,6 @@ class Processor(ConsumerProducer): "output_schema": PromptResponse, "text_completion_request_queue": tc_request_queue, "text_completion_response_queue": tc_response_queue, - "definition_template": definition_template, - "relationship_template": relationship_template, - "knowledge_query_template": knowledge_query_template, } ) @@ -64,6 +63,7 @@ class Processor(ConsumerProducer): self.definition_template = definition_template self.relationship_template = relationship_template self.knowledge_query_template = knowledge_query_template + self.document_query_template = document_query_template def handle(self, msg): @@ -92,6 +92,11 @@ class Processor(ConsumerProducer): self.handle_kg_prompt(id, v) return + elif kind == "document-prompt": + + self.handle_document_prompt(id, v) + return + else: print("Invalid kind.", flush=True) @@ -120,6 +125,11 @@ class Processor(ConsumerProducer): e = defn["entity"] d = defn["definition"] + if e == "": continue + if e is None: continue + if d == "": continue + if d is None: continue + output.append( Definition( name=e, definition=d @@ -171,12 +181,30 @@ class Processor(ConsumerProducer): for defn in defs: try: + + s = defn["subject"] + p = defn["predicate"] + o = defn["object"] + o_entity = defn["object-entity"] + + if s == "": continue + if s is None: continue + + if p == "": continue + if p is None: continue + + if o == "": continue + if o is None: continue + + if o_entity == "" or o_entity is None: + o_entity = False + output.append( Relationship( - s = defn["subject"], - p = defn["predicate"], - o = defn["object"], - o_entity = defn["object-entity"], + s = s, + p = p, + o = o, + o_entity = o_entity, ) ) @@ -239,6 +267,42 @@ class Processor(ConsumerProducer): self.producer.send(r, properties={"id": id}) + def handle_document_prompt(self, id, v): + + try: + + prompt = to_document_query( + self.document_query_template, v.query, v.documents + ) + + print(prompt) + + ans = self.llm.request(prompt) + + print(ans) + + print("Send response...", flush=True) + r = PromptResponse(answer=ans, error=None) + self.producer.send(r, properties={"id": id}) + + print("Done.", flush=True) + + except Exception as e: + + print(f"Exception: {e}") + + print("Send error response...", flush=True) + + r = PromptResponse( + error=Error( + type = "llm-error", + message = str(e), + ), + response=None, + ) + + self.producer.send(r, properties={"id": id}) + @staticmethod def add_args(parser): @@ -277,6 +341,12 @@ class Processor(ConsumerProducer): help=f'Knowledge query template', ) + parser.add_argument( + '--document-query-template', + required=True, + help=f'Document query template', + ) + def run(): Processor.start(module, __doc__) diff --git a/trustgraph/query/doc_embeddings/__init__.py b/trustgraph/query/doc_embeddings/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/trustgraph/query/doc_embeddings/milvus/__init__.py b/trustgraph/query/doc_embeddings/milvus/__init__.py new file mode 100644 index 00000000..ba844705 --- /dev/null +++ b/trustgraph/query/doc_embeddings/milvus/__init__.py @@ -0,0 +1,3 @@ + +from . service import * + diff --git a/trustgraph/query/doc_embeddings/milvus/__main__.py b/trustgraph/query/doc_embeddings/milvus/__main__.py new file mode 100755 index 00000000..89684e3e --- /dev/null +++ b/trustgraph/query/doc_embeddings/milvus/__main__.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +from . hf import run + +if __name__ == '__main__': + run() + diff --git a/trustgraph/query/doc_embeddings/milvus/service.py b/trustgraph/query/doc_embeddings/milvus/service.py new file mode 100755 index 00000000..8e106e6f --- /dev/null +++ b/trustgraph/query/doc_embeddings/milvus/service.py @@ -0,0 +1,106 @@ + +""" +Document embeddings query service. Input is vector, output is an array +of chunks +""" + +from .... direct.milvus_doc_embeddings import DocVectors +from .... schema import DocumentEmbeddingsRequest, DocumentEmbeddingsResponse +from .... schema import Error, Value +from .... schema import document_embeddings_request_queue +from .... schema import document_embeddings_response_queue +from .... base import ConsumerProducer + +module = ".".join(__name__.split(".")[1:-1]) + +default_input_queue = document_embeddings_request_queue +default_output_queue = document_embeddings_response_queue +default_subscriber = module +default_store_uri = 'http://localhost:19530' + +class Processor(ConsumerProducer): + + def __init__(self, **params): + + input_queue = params.get("input_queue", default_input_queue) + output_queue = params.get("output_queue", default_output_queue) + subscriber = params.get("subscriber", default_subscriber) + store_uri = params.get("store_uri", default_store_uri) + + super(Processor, self).__init__( + **params | { + "input_queue": input_queue, + "output_queue": output_queue, + "subscriber": subscriber, + "input_schema": DocumentEmbeddingsRequest, + "output_schema": DocumentEmbeddingsResponse, + "store_uri": store_uri, + } + ) + + self.vecstore = DocVectors(store_uri) + + def handle(self, msg): + + try: + + v = msg.value() + + # Sender-produced ID + id = msg.properties()["id"] + + print(f"Handling input {id}...", flush=True) + + chunks = [] + + for vec in v.vectors: + + resp = self.vecstore.search(vec, limit=v.limit) + + for r in resp: + chunk = r["entity"]["doc"] + chunk = chunk.encode("utf-8") + chunks.append(chunk) + + print("Send response...", flush=True) + r = DocumentEmbeddingsResponse(documents=chunks, error=None) + self.producer.send(r, properties={"id": id}) + + print("Done.", flush=True) + + except Exception as e: + + print(f"Exception: {e}") + + print("Send error response...", flush=True) + + r = DocumentEmbeddingsResponse( + error=Error( + type = "llm-error", + message = str(e), + ), + documents=None, + ) + + self.producer.send(r, properties={"id": id}) + + self.consumer.acknowledge(msg) + + @staticmethod + def add_args(parser): + + ConsumerProducer.add_args( + parser, default_input_queue, default_subscriber, + default_output_queue, + ) + + parser.add_argument( + '-t', '--store-uri', + default=default_store_uri, + help=f'Milvus store URI (default: {default_store_uri})' + ) + +def run(): + + Processor.start(module, __doc__) + diff --git a/trustgraph/query/graph_embeddings/milvus/service.py b/trustgraph/query/graph_embeddings/milvus/service.py index bb2eaa0d..b5f9ae5b 100755 --- a/trustgraph/query/graph_embeddings/milvus/service.py +++ b/trustgraph/query/graph_embeddings/milvus/service.py @@ -4,7 +4,7 @@ Graph embeddings query service. Input is vector, output is list of entities """ -from .... direct.milvus import TripleVectors +from .... direct.milvus_graph_embeddings import EntityVectors from .... schema import GraphEmbeddingsRequest, GraphEmbeddingsResponse from .... schema import Error, Value from .... schema import graph_embeddings_request_queue @@ -38,7 +38,7 @@ class Processor(ConsumerProducer): } ) - self.vecstore = TripleVectors(store_uri) + self.vecstore = EntityVectors(store_uri) def create_value(self, ent): if ent.startswith("http://") or ent.startswith("https://"): @@ -94,7 +94,7 @@ class Processor(ConsumerProducer): type = "llm-error", message = str(e), ), - response=None, + entities=None, ) self.producer.send(r, properties={"id": id}) diff --git a/trustgraph/retrieval/document_rag/__init__.py b/trustgraph/retrieval/document_rag/__init__.py new file mode 100644 index 00000000..432ae594 --- /dev/null +++ b/trustgraph/retrieval/document_rag/__init__.py @@ -0,0 +1,3 @@ + +from . rag import * + diff --git a/trustgraph/retrieval/document_rag/__main__.py b/trustgraph/retrieval/document_rag/__main__.py new file mode 100755 index 00000000..89ebb780 --- /dev/null +++ b/trustgraph/retrieval/document_rag/__main__.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +from . rag import run + +if __name__ == '__main__': + run() + diff --git a/trustgraph/retrieval/document_rag/rag.py b/trustgraph/retrieval/document_rag/rag.py new file mode 100755 index 00000000..e26cb86e --- /dev/null +++ b/trustgraph/retrieval/document_rag/rag.py @@ -0,0 +1,194 @@ + +""" +Simple RAG service, performs query using document RAG an LLM. +Input is query, output is response. +""" + +from ... schema import DocumentRagQuery, DocumentRagResponse, Error +from ... schema import document_rag_request_queue, document_rag_response_queue +from ... schema import prompt_request_queue +from ... schema import prompt_response_queue +from ... schema import embeddings_request_queue +from ... schema import embeddings_response_queue +from ... schema import document_embeddings_request_queue +from ... schema import document_embeddings_response_queue +from ... log_level import LogLevel +from ... document_rag import DocumentRag +from ... base import ConsumerProducer + +module = ".".join(__name__.split(".")[1:-1]) + +default_input_queue = document_rag_request_queue +default_output_queue = document_rag_response_queue +default_subscriber = module + +class Processor(ConsumerProducer): + + def __init__(self, **params): + + input_queue = params.get("input_queue", default_input_queue) + output_queue = params.get("output_queue", default_output_queue) + subscriber = params.get("subscriber", default_subscriber) + entity_limit = params.get("entity_limit", 50) + triple_limit = params.get("triple_limit", 30) + pr_request_queue = params.get( + "prompt_request_queue", prompt_request_queue + ) + pr_response_queue = params.get( + "prompt_response_queue", prompt_response_queue + ) + emb_request_queue = params.get( + "embeddings_request_queue", embeddings_request_queue + ) + emb_response_queue = params.get( + "embeddings_response_queue", embeddings_response_queue + ) + de_request_queue = params.get( + "document_embeddings_request_queue", + document_embeddings_request_queue + ) + de_response_queue = params.get( + "document_embeddings_response_queue", + document_embeddings_response_queue + ) + + super(Processor, self).__init__( + **params | { + "input_queue": input_queue, + "output_queue": output_queue, + "subscriber": subscriber, + "input_schema": DocumentRagQuery, + "output_schema": DocumentRagResponse, + "prompt_request_queue": pr_request_queue, + "prompt_response_queue": pr_response_queue, + "embeddings_request_queue": emb_request_queue, + "embeddings_response_queue": emb_response_queue, + "document_embeddings_request_queue": de_request_queue, + "document_embeddings_response_queue": de_response_queue, + } + ) + + self.rag = DocumentRag( + pulsar_host=self.pulsar_host, + pr_request_queue=pr_request_queue, + pr_response_queue=pr_response_queue, + emb_request_queue=emb_request_queue, + emb_response_queue=emb_response_queue, + de_request_queue=de_request_queue, + de_response_queue=de_response_queue, + verbose=True, + module=module, + ) + + def handle(self, msg): + + try: + + v = msg.value() + + # Sender-produced ID + id = msg.properties()["id"] + + print(f"Handling input {id}...", flush=True) + + response = self.rag.query(v.query) + + print("Send response...", flush=True) + r = DocumentRagResponse(response = response, error=None) + self.producer.send(r, properties={"id": id}) + + print("Done.", flush=True) + + except Exception as e: + + print(f"Exception: {e}") + + print("Send error response...", flush=True) + + r = GraphRagResponse( + error=Error( + type = "llm-error", + message = str(e), + ), + response=None, + ) + + self.producer.send(r, properties={"id": id}) + + self.consumer.acknowledge(msg) + + @staticmethod + def add_args(parser): + + ConsumerProducer.add_args( + parser, default_input_queue, default_subscriber, + default_output_queue, + ) + + parser.add_argument( + '-v', '--vector-store', + default='http://milvus:19530', + help=f'Vector host (default: http://milvus:19530)' + ) + + parser.add_argument( + '-e', '--entity-limit', + type=int, + default=50, + help=f'Entity vector fetch limit (default: 50)' + ) + + parser.add_argument( + '-t', '--triple-limit', + type=int, + default=30, + help=f'Triple query limit, per query (default: 30)' + ) + + parser.add_argument( + '-u', '--max-subgraph-size', + type=int, + default=3000, + help=f'Max subgraph size (default: 3000)' + ) + + parser.add_argument( + '--prompt-request-queue', + default=prompt_request_queue, + help=f'Prompt request queue (default: {prompt_request_queue})', + ) + + parser.add_argument( + '--prompt-response-queue', + default=prompt_response_queue, + help=f'Prompt response queue (default: {prompt_response_queue})', + ) + + parser.add_argument( + '--embeddings-request-queue', + default=embeddings_request_queue, + help=f'Embeddings request queue (default: {embeddings_request_queue})', + ) + + parser.add_argument( + '--embeddings-response-queue', + default=embeddings_response_queue, + help=f'Embeddings response queue (default: {embeddings_response_queue})', + ) + + parser.add_argument( + '--document-embeddings-request-queue', + default=document_embeddings_request_queue, + help=f'Document embeddings request queue (default: {document_embeddings_request_queue})', + ) + + parser.add_argument( + '--document-embeddings-response-queue', + default=document_embeddings_response_queue, + help=f'Document embeddings response queue (default: {document_embeddings_response_queue})', + ) + +def run(): + + Processor.start(module, __doc__) + diff --git a/trustgraph/retrieval/graph_rag/rag.py b/trustgraph/retrieval/graph_rag/rag.py index 98697d4f..c155011b 100755 --- a/trustgraph/retrieval/graph_rag/rag.py +++ b/trustgraph/retrieval/graph_rag/rag.py @@ -206,7 +206,7 @@ class Processor(ConsumerProducer): ) parser.add_argument( - '--graph_embeddings-response-queue', + '--graph-embeddings-response-queue', default=graph_embeddings_response_queue, help=f'Graph embeddings response queue (default: {graph_embeddings_response_queue})', ) diff --git a/trustgraph/schema.py b/trustgraph/schema.py index 6b711677..ddc4c67d 100644 --- a/trustgraph/schema.py +++ b/trustgraph/schema.py @@ -96,6 +96,25 @@ graph_embeddings_response_queue = topic( ############################################################################ +# Doc embeddings query + +class DocumentEmbeddingsRequest(Record): + vectors = Array(Array(Double())) + limit = Integer() + +class DocumentEmbeddingsResponse(Record): + error = Error() + documents = Array(Bytes()) + +document_embeddings_request_queue = topic( + 'doc-embeddings', kind='non-persistent', namespace='request' +) +document_embeddings_response_queue = topic( + 'doc-embeddings-response', kind='non-persistent', namespace='response', +) + +############################################################################ + # Graph triples class Triple(Record): @@ -187,6 +206,24 @@ graph_rag_response_queue = topic( ############################################################################ +# Document RAG text retrieval + +class DocumentRagQuery(Record): + query = String() + +class DocumentRagResponse(Record): + error = Error() + response = String() + +document_rag_request_queue = topic( + 'doc-rag', kind='non-persistent', namespace='request' +) +document_rag_response_queue = topic( + 'doc-rag-response', kind='non-persistent', namespace='response' +) + +############################################################################ + # Prompt services, abstract the prompt generation class Definition(Record): @@ -208,14 +245,17 @@ class Fact(Record): # chunk -> definitions # extract-relationships: # chunk -> relationships -# prompt-rag: +# kg-prompt: # query, triples -> answer +# document-prompt: +# query, documents -> answer class PromptRequest(Record): kind = String() chunk = String() query = String() kg = Array(Fact()) + documents = Array(Bytes()) class PromptResponse(Record): error = Error() diff --git a/trustgraph/storage/doc_embeddings/milvus/write.py b/trustgraph/storage/doc_embeddings/milvus/write.py index 9256f011..00f9d5b5 100755 --- a/trustgraph/storage/doc_embeddings/milvus/write.py +++ b/trustgraph/storage/doc_embeddings/milvus/write.py @@ -3,15 +3,15 @@ Accepts entity/vector pairs and writes them to a Milvus store. """ -from .... schema import GraphEmbeddings -from .... schema import graph_embeddings_store_queue +from .... schema import ChunkEmbeddings +from .... schema import chunk_embeddings_ingest_queue from .... log_level import LogLevel -from .... direct.milvus import TripleVectors +from .... direct.milvus_doc_embeddings import DocVectors from .... base import Consumer module = ".".join(__name__.split(".")[1:-1]) -default_input_queue = graph_embeddings_store_queue +default_input_queue = chunk_embeddings_ingest_queue default_subscriber = module default_store_uri = 'http://localhost:19530' @@ -27,20 +27,22 @@ class Processor(Consumer): **params | { "input_queue": input_queue, "subscriber": subscriber, - "input_schema": GraphEmbeddings, + "input_schema": ChunkEmbeddings, "store_uri": store_uri, } ) - self.vecstore = TripleVectors(store_uri) + self.vecstore = DocVectors(store_uri) def handle(self, msg): v = msg.value() - if v.entity.value != "": + chunk = v.chunk.decode("utf-8") + + if v.chunk != "" and v.chunk is not None: for vec in v.vectors: - self.vecstore.insert(vec, v.entity.value) + self.vecstore.insert(vec, chunk) @staticmethod def add_args(parser): diff --git a/trustgraph/storage/graph_embeddings/milvus/write.py b/trustgraph/storage/graph_embeddings/milvus/write.py index 9256f011..98fe7915 100755 --- a/trustgraph/storage/graph_embeddings/milvus/write.py +++ b/trustgraph/storage/graph_embeddings/milvus/write.py @@ -6,7 +6,7 @@ Accepts entity/vector pairs and writes them to a Milvus store. from .... schema import GraphEmbeddings from .... schema import graph_embeddings_store_queue from .... log_level import LogLevel -from .... direct.milvus import TripleVectors +from .... direct.milvus_graph_embeddings import EntityVectors from .... base import Consumer module = ".".join(__name__.split(".")[1:-1]) @@ -32,7 +32,7 @@ class Processor(Consumer): } ) - self.vecstore = TripleVectors(store_uri) + self.vecstore = EntityVectors(store_uri) def handle(self, msg):