diff --git a/Makefile b/Makefile index c33db3d6..64560869 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # VERSION=$(shell git describe | sed 's/^v//') -VERSION=0.6.2 +VERSION=0.6.3 DOCKER=podman diff --git a/docker-compose-azure.yaml b/docker-compose-azure.yaml index 0c03f9c0..e1bcf349 100644 --- a/docker-compose-azure.yaml +++ b/docker-compose-azure.yaml @@ -11,14 +11,14 @@ - "chunker-recursive" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "etcd": "command": @@ -60,7 +60,7 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,14 +77,14 @@ - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "milvus": "command": @@ -122,7 +122,7 @@ - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prometheus": "image": "docker.io/prom/prometheus:v2.53.1" @@ -141,7 +141,7 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prompt-rag": "command": @@ -156,7 +156,7 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -183,7 +183,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "query-triples": "command": @@ -192,7 +192,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -201,7 +201,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-triples": "command": @@ -210,7 +210,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion": "command": @@ -221,7 +221,7 @@ - "${AZURE_TOKEN}" - "-e" - "${AZURE_ENDPOINT}" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion-rag": "command": @@ -236,14 +236,14 @@ - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/docker-compose-bedrock.yaml b/docker-compose-bedrock.yaml index fb73a518..31da148d 100644 --- a/docker-compose-bedrock.yaml +++ b/docker-compose-bedrock.yaml @@ -15,14 +15,14 @@ - "2000" - "--chunk-overlap" - "100" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "etcd": "command": @@ -64,7 +64,7 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "init-pulsar": "command": @@ -81,14 +81,14 @@ - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "milvus": "command": @@ -126,7 +126,7 @@ - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prometheus": "image": "docker.io/prom/prometheus:v2.53.1" @@ -145,7 +145,7 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prompt-rag": "command": @@ -160,7 +160,7 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -187,7 +187,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "query-triples": "command": @@ -196,7 +196,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -205,7 +205,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-triples": "command": @@ -214,7 +214,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion": "command": @@ -227,7 +227,7 @@ - "${AWS_SECRET_KEY}" - "-r" - "us-west-2" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion-rag": "command": @@ -244,14 +244,14 @@ - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/docker-compose-claude.yaml b/docker-compose-claude.yaml index cdc79cd9..a3195c20 100644 --- a/docker-compose-claude.yaml +++ b/docker-compose-claude.yaml @@ -11,14 +11,14 @@ - "chunker-recursive" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "etcd": "command": @@ -60,7 +60,7 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,14 +77,14 @@ - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "milvus": "command": @@ -122,7 +122,7 @@ - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prometheus": "image": "docker.io/prom/prometheus:v2.53.1" @@ -141,7 +141,7 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prompt-rag": "command": @@ -156,7 +156,7 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -183,7 +183,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "query-triples": "command": @@ -192,7 +192,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -201,7 +201,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-triples": "command": @@ -210,7 +210,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion": "command": @@ -219,7 +219,7 @@ - "pulsar://pulsar:6650" - "-k" - "${CLAUDE_KEY}" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion-rag": "command": @@ -232,14 +232,14 @@ - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/docker-compose-cohere.yaml b/docker-compose-cohere.yaml index 2d80a7b7..d57a0268 100644 --- a/docker-compose-cohere.yaml +++ b/docker-compose-cohere.yaml @@ -15,14 +15,14 @@ - "1000" - "--chunk-overlap" - "50" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "etcd": "command": @@ -64,7 +64,7 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "init-pulsar": "command": @@ -81,14 +81,14 @@ - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "milvus": "command": @@ -126,7 +126,7 @@ - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prometheus": "image": "docker.io/prom/prometheus:v2.53.1" @@ -145,7 +145,7 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prompt-rag": "command": @@ -160,7 +160,7 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -187,7 +187,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "query-triples": "command": @@ -196,7 +196,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -205,7 +205,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-triples": "command": @@ -214,7 +214,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion": "command": @@ -223,7 +223,7 @@ - "pulsar://pulsar:6650" - "-k" - "${COHERE_KEY}" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion-rag": "command": @@ -236,14 +236,14 @@ - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/docker-compose-mix.yaml b/docker-compose-mix.yaml index 8306a043..fef86735 100644 --- a/docker-compose-mix.yaml +++ b/docker-compose-mix.yaml @@ -15,14 +15,14 @@ - "4000" - "--chunk-overlap" - "120" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "etcd": "command": @@ -64,7 +64,7 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "init-pulsar": "command": @@ -81,14 +81,14 @@ - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "milvus": "command": @@ -126,7 +126,7 @@ - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prometheus": "image": "docker.io/prom/prometheus:v2.53.1" @@ -145,7 +145,7 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prompt-rag": "command": @@ -160,7 +160,7 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -187,7 +187,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "query-triples": "command": @@ -196,7 +196,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -205,7 +205,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-triples": "command": @@ -214,7 +214,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion": "command": @@ -225,7 +225,7 @@ - "${COHERE_KEY}" - "-m" - "c4ai-aya-23-35b" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion-rag": "command": @@ -240,14 +240,14 @@ - "non-persistent://tg/response/text-completion-rag-response" - "-m" - "c4ai-aya-23-8b" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/docker-compose-ollama.yaml b/docker-compose-ollama.yaml index 5c760332..cc628747 100644 --- a/docker-compose-ollama.yaml +++ b/docker-compose-ollama.yaml @@ -11,14 +11,14 @@ - "chunker-recursive" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "etcd": "command": @@ -60,7 +60,7 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,14 +77,14 @@ - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "milvus": "command": @@ -122,7 +122,7 @@ - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prometheus": "image": "docker.io/prom/prometheus:v2.53.1" @@ -141,7 +141,7 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prompt-rag": "command": @@ -156,7 +156,7 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -183,7 +183,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "query-triples": "command": @@ -192,7 +192,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -201,7 +201,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-triples": "command": @@ -210,7 +210,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion": "command": @@ -219,7 +219,7 @@ - "pulsar://pulsar:6650" - "-r" - "${OLLAMA_HOST}" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion-rag": "command": @@ -232,14 +232,14 @@ - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/docker-compose-openai-neo4j.yaml b/docker-compose-openai-neo4j.yaml index a44fb575..5f0aedd4 100644 --- a/docker-compose-openai-neo4j.yaml +++ b/docker-compose-openai-neo4j.yaml @@ -4,14 +4,14 @@ - "chunker-recursive" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "etcd": "command": @@ -53,7 +53,7 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "init-pulsar": "command": @@ -70,14 +70,14 @@ - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "milvus": "command": @@ -125,7 +125,7 @@ - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prometheus": "image": "docker.io/prom/prometheus:v2.53.1" @@ -144,7 +144,7 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prompt-rag": "command": @@ -159,7 +159,7 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -186,7 +186,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "query-triples": "command": @@ -195,7 +195,7 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -204,7 +204,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-triples": "command": @@ -213,7 +213,7 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion": "command": @@ -222,7 +222,7 @@ - "pulsar://pulsar:6650" - "-k" - "${OPENAI_KEY}" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion-rag": "command": @@ -235,14 +235,14 @@ - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": "etcd": {} diff --git a/docker-compose-openai.yaml b/docker-compose-openai.yaml index f6dd3667..5e0de8a8 100644 --- a/docker-compose-openai.yaml +++ b/docker-compose-openai.yaml @@ -11,14 +11,14 @@ - "chunker-recursive" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "etcd": "command": @@ -60,7 +60,7 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,14 +77,14 @@ - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "milvus": "command": @@ -122,7 +122,7 @@ - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prometheus": "image": "docker.io/prom/prometheus:v2.53.1" @@ -141,7 +141,7 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prompt-rag": "command": @@ -156,7 +156,7 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -183,7 +183,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "query-triples": "command": @@ -192,7 +192,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -201,7 +201,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-triples": "command": @@ -210,7 +210,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion": "command": @@ -219,7 +219,7 @@ - "pulsar://pulsar:6650" - "-k" - "${OPENAI_KEY}" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion-rag": "command": @@ -232,14 +232,14 @@ - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/docker-compose-vertexai.yaml b/docker-compose-vertexai.yaml index fac552bd..fd024c47 100644 --- a/docker-compose-vertexai.yaml +++ b/docker-compose-vertexai.yaml @@ -11,14 +11,14 @@ - "chunker-recursive" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "etcd": "command": @@ -60,7 +60,7 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,14 +77,14 @@ - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "milvus": "command": @@ -122,7 +122,7 @@ - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prometheus": "image": "docker.io/prom/prometheus:v2.53.1" @@ -141,7 +141,7 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "prompt-rag": "command": @@ -156,7 +156,7 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" @@ -183,7 +183,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "query-triples": "command": @@ -192,7 +192,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -201,7 +201,7 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "store-triples": "command": @@ -210,7 +210,7 @@ - "pulsar://pulsar:6650" - "-g" - "cassandra" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "text-completion": "command": @@ -221,7 +221,7 @@ - "/vertexai/private.json" - "-r" - "us-west1" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -238,7 +238,7 @@ - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -247,7 +247,7 @@ - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.2" + "image": "docker.io/trustgraph/trustgraph-flow:0.6.3" "restart": "on-failure:100" "volumes": "cassandra": {} diff --git a/setup.py b/setup.py index a395b74f..13c1c18b 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.6.2" +version = "0.6.3" setuptools.setup( name="trustgraph", diff --git a/templates/components/version.jsonnet b/templates/components/version.jsonnet deleted file mode 100644 index a3820e12..00000000 --- a/templates/components/version.jsonnet +++ /dev/null @@ -1 +0,0 @@ -"0.6.2" diff --git a/trustgraph/base/consumer.py b/trustgraph/base/consumer.py index ec20349b..0c975cf5 100644 --- a/trustgraph/base/consumer.py +++ b/trustgraph/base/consumer.py @@ -1,8 +1,10 @@ from pulsar.schema import JsonSchema from prometheus_client import start_http_server, Histogram, Info, Counter +import time from . base_processor import BaseProcessor +from .. exceptions import TooManyRequests class Consumer(BaseProcessor): @@ -59,6 +61,13 @@ class Consumer(BaseProcessor): __class__.processing_metric.labels(status="success").inc() + except TooManyRequests: + self.consumer.negative_acknowledge(msg) + print("TooManyRequests: will retry") + __class__.processing_metric.labels(status="rate-limit").inc() + time.sleep(5) + continue + except Exception as e: print("Exception:", e, flush=True) diff --git a/trustgraph/base/consumer_producer.py b/trustgraph/base/consumer_producer.py index 06704d02..affa73b7 100644 --- a/trustgraph/base/consumer_producer.py +++ b/trustgraph/base/consumer_producer.py @@ -1,8 +1,10 @@ from pulsar.schema import JsonSchema from prometheus_client import Histogram, Info, Counter +import time from . base_processor import BaseProcessor +from .. exceptions import TooManyRequests # FIXME: Derive from consumer? And producer? @@ -78,6 +80,13 @@ class ConsumerProducer(BaseProcessor): __class__.processing_metric.labels(status="success").inc() + except TooManyRequests: + self.consumer.negative_acknowledge(msg) + print("TooManyRequests: will retry") + __class__.processing_metric.labels(status="rate-limit").inc() + time.sleep(5) + continue + except Exception as e: print("Exception:", e, flush=True) diff --git a/trustgraph/embeddings_client.py b/trustgraph/embeddings_client.py index 6daa2ff5..dd648af4 100644 --- a/trustgraph/embeddings_client.py +++ b/trustgraph/embeddings_client.py @@ -51,7 +51,7 @@ class EmbeddingsClient: schema=JsonSchema(EmbeddingsResponse), ) - def request(self, text, timeout=500): + def request(self, text, timeout=10): id = str(uuid.uuid4()) diff --git a/trustgraph/exceptions.py b/trustgraph/exceptions.py new file mode 100644 index 00000000..e5647e3e --- /dev/null +++ b/trustgraph/exceptions.py @@ -0,0 +1,4 @@ + +class TooManyRequests(Exception): + pass + diff --git a/trustgraph/llm_client.py b/trustgraph/llm_client.py index 062fb323..72be3192 100644 --- a/trustgraph/llm_client.py +++ b/trustgraph/llm_client.py @@ -51,7 +51,7 @@ class LlmClient: schema=JsonSchema(TextCompletionResponse), ) - def request(self, prompt, timeout=500): + def request(self, prompt, timeout=30): id = str(uuid.uuid4()) diff --git a/trustgraph/model/text_completion/azure/llm.py b/trustgraph/model/text_completion/azure/llm.py index e3e7a559..71338455 100755 --- a/trustgraph/model/text_completion/azure/llm.py +++ b/trustgraph/model/text_completion/azure/llm.py @@ -12,6 +12,7 @@ from .... schema import text_completion_request_queue from .... schema import text_completion_response_queue from .... log_level import LogLevel from .... base import ConsumerProducer +from .... exceptions import TooManyRequests module = ".".join(__name__.split(".")[1:-1]) @@ -76,6 +77,10 @@ class Processor(ConsumerProducer): } resp = requests.post(url, data=body, headers=headers) + + if resp.status_code == 429: + raise TooManyRequests() + result = resp.json() message_content = result['choices'][0]['message']['content'] diff --git a/trustgraph/model/text_completion/bedrock/llm.py b/trustgraph/model/text_completion/bedrock/llm.py index 8a158183..11485af0 100755 --- a/trustgraph/model/text_completion/bedrock/llm.py +++ b/trustgraph/model/text_completion/bedrock/llm.py @@ -13,6 +13,7 @@ from .... schema import text_completion_request_queue from .... schema import text_completion_response_queue from .... log_level import LogLevel from .... base import ConsumerProducer +from .... exceptions import TooManyRequests module = ".".join(__name__.split(".")[1:-1]) @@ -121,6 +122,8 @@ class Processor(ConsumerProducer): accept = 'application/json' contentType = 'application/json' + # FIXME: Consider catching request limits and raise TooManyRequests + # See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html response = self.bedrock.invoke_model(body=promptbody, modelId=self.model, accept=accept, contentType=contentType) # Mistral Response Structure diff --git a/trustgraph/model/text_completion/claude/llm.py b/trustgraph/model/text_completion/claude/llm.py index f5665201..29e5277d 100755 --- a/trustgraph/model/text_completion/claude/llm.py +++ b/trustgraph/model/text_completion/claude/llm.py @@ -57,6 +57,8 @@ class Processor(ConsumerProducer): print(f"Handling prompt {id}...", flush=True) prompt = v.prompt + + # FIXME: Rate limits? response = message = self.claude.messages.create( model=self.model, max_tokens=1000, diff --git a/trustgraph/model/text_completion/cohere/llm.py b/trustgraph/model/text_completion/cohere/llm.py index ce1aa364..e52c2889 100755 --- a/trustgraph/model/text_completion/cohere/llm.py +++ b/trustgraph/model/text_completion/cohere/llm.py @@ -59,15 +59,16 @@ class Processor(ConsumerProducer): prompt = v.prompt + # FIXME: Deal with rate limits? output = self.cohere.chat( - model=self.model, - message=prompt, - preamble = "You are a helpful AI-assistant.", - temperature=0.0, - chat_history=[], - prompt_truncation='auto', - connectors=[] - ) + model=self.model, + message=prompt, + preamble = "You are a helpful AI-assistant.", + temperature=0.0, + chat_history=[], + prompt_truncation='auto', + connectors=[] + ) resp = output.text print(resp, flush=True) diff --git a/trustgraph/model/text_completion/ollama/llm.py b/trustgraph/model/text_completion/ollama/llm.py index 90cd9a53..900140a2 100755 --- a/trustgraph/model/text_completion/ollama/llm.py +++ b/trustgraph/model/text_completion/ollama/llm.py @@ -65,6 +65,8 @@ class Processor(ConsumerProducer): print(f"Handling prompt {id}...", flush=True) prompt = v.prompt + + # FIXME: Rate limits? response = self.llm.invoke(prompt) print("Send response...", flush=True) diff --git a/trustgraph/model/text_completion/openai/llm.py b/trustgraph/model/text_completion/openai/llm.py index 44226bbd..25b84070 100755 --- a/trustgraph/model/text_completion/openai/llm.py +++ b/trustgraph/model/text_completion/openai/llm.py @@ -57,6 +57,8 @@ class Processor(ConsumerProducer): print(f"Handling prompt {id}...", flush=True) prompt = v.prompt + + # FIXME: Rate limits resp = self.openai.chat.completions.create( model=self.model, messages=[ diff --git a/trustgraph/model/text_completion/vertexai/llm.py b/trustgraph/model/text_completion/vertexai/llm.py index 4861dd8e..3da0c041 100755 --- a/trustgraph/model/text_completion/vertexai/llm.py +++ b/trustgraph/model/text_completion/vertexai/llm.py @@ -26,6 +26,7 @@ from .... schema import text_completion_request_queue from .... schema import text_completion_response_queue from .... log_level import LogLevel from .... base import ConsumerProducer +from .... exceptions import TooManyRequests module = ".".join(__name__.split(".")[1:-1]) @@ -139,9 +140,8 @@ class Processor(ConsumerProducer): except google.api_core.exceptions.ResourceExhausted: - print("429, resource busy, sleeping", flush=True) - time.sleep(15) - self.consumer.negative_acknowledge(msg) + # 429 / rate limits case + raise TooManyRequests # Let other exceptions fall through diff --git a/trustgraph/prompt_client.py b/trustgraph/prompt_client.py index 1bbf432c..3a9ad9d1 100644 --- a/trustgraph/prompt_client.py +++ b/trustgraph/prompt_client.py @@ -51,7 +51,7 @@ class PromptClient: schema=JsonSchema(PromptResponse), ) - def request_definitions(self, chunk, timeout=500): + def request_definitions(self, chunk, timeout=30): id = str(uuid.uuid4())