Fix auto-templates (#17)

This commit is contained in:
cybermaggedon 2024-08-22 00:19:55 +01:00 committed by GitHub
parent c4bfd9fc8c
commit d3cdb97528
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 150 additions and 82 deletions

View file

@ -36,10 +36,10 @@ set-version:
TEMPLATES=azure bedrock claude cohere mix ollama openai vertexai \
openai-neo4j storage
DCS=$(foreach template,${TEMPLATES},${template:%=docker-compose-%.yaml})
DCS=$(foreach template,${TEMPLATES},${template:%=tg-launch-%.yaml})
update-templates: set-version ${DCS}
docker-compose-%.yaml: templates/docker-compose-%.jsonnet templates/components/version.jsonnet
jsonnet -S ${@:docker-compose-%.yaml=templates/docker-compose-%.jsonnet} > $@
tg-launch-%.yaml: templates/%.jsonnet templates/components/version.jsonnet
jsonnet -S ${@:tg-launch-%.yaml=templates/%.jsonnet} > $@

View file

@ -14,6 +14,10 @@ local url = import "url.jsonnet";
"${AZURE_TOKEN}",
"-e",
"${AZURE_ENDPOINT}",
"-x",
"4096",
"-t",
"0.0",
],
},
@ -28,6 +32,10 @@ local url = import "url.jsonnet";
"-e",
"${AZURE_ENDPOINT}",
"-i",
"-x",
"4096",
"-t",
"0.0",
"non-persistent://tg/request/text-completion-rag",
"-o",
"non-persistent://tg/response/text-completion-rag-response",

View file

@ -29,6 +29,12 @@ local url = import "url.jsonnet";
"${AWS_SECRET_KEY}",
"-r",
"us-west-2",
"-x",
"4096",
"-t",
"0.0",
"-m",
"mistral.mixtral-8x7b-instruct-v0:1",
],
},
@ -46,6 +52,12 @@ local url = import "url.jsonnet";
"${AWS_SECRET_KEY}",
"-r",
"us-west-2",
"-x",
"4096",
"-t",
"0.0",
"-m",
"mistral.mixtral-8x7b-instruct-v0:1",
"-i",
"non-persistent://tg/request/text-completion-rag",
"-o",

View file

@ -12,6 +12,10 @@ local url = import "url.jsonnet";
url.pulsar,
"-k",
"${CLAUDE_KEY}",
"-x",
"4096",
"-t",
"0.0",
],
},
@ -23,6 +27,10 @@ local url = import "url.jsonnet";
url.pulsar,
"-k",
"${CLAUDE_KEY}",
"-x",
"4096",
"-t",
"0.0",
"-i",
"non-persistent://tg/request/text-completion-rag",
"-o",

View file

@ -7,13 +7,13 @@ local url = import "url.jsonnet";
chunker: base + {
image: images.trustgraph,
command: [
"chunker-recursive",
"${CHUNKER:-chunker-token}",
"-p",
url.pulsar,
"--chunk-size",
"1000",
"150",
"--chunk-overlap",
"50",
"10",
],
},
@ -25,6 +25,8 @@ local url = import "url.jsonnet";
url.pulsar,
"-k",
"${COHERE_KEY}",
"-t",
"0.0",
],
},
@ -36,6 +38,8 @@ local url = import "url.jsonnet";
url.pulsar,
"-k",
"${COHERE_KEY}",
"-t",
"0.0",
"-i",
"non-persistent://tg/request/text-completion-rag",
"-o",

View file

@ -10,8 +10,8 @@ local url = import "url.jsonnet";
"text-completion-ollama",
"-p",
url.pulsar,
// "-m",
// "llama3.1:8b",
"-m",
"gemma2:9b",
"-r",
"${OLLAMA_HOST}",
],
@ -23,8 +23,8 @@ local url = import "url.jsonnet";
"text-completion-ollama",
"-p",
url.pulsar,
// "-m",
// "llama3.1:8b",
"-m",
"gemma2:9b",
"-r",
"${OLLAMA_HOST}",
"-i",

View file

@ -12,6 +12,10 @@ local url = import "url.jsonnet";
url.pulsar,
"-k",
"${OPENAI_KEY}",
"-x",
"4096",
"-t",
"0.0",
],
},
@ -23,6 +27,10 @@ local url = import "url.jsonnet";
url.pulsar,
"-k",
"${OPENAI_KEY}",
"-x",
"4096",
"-t",
"0.0",
"-i",
"non-persistent://tg/request/text-completion-rag",
"-o",

View file

@ -13,7 +13,11 @@ local url = import "url.jsonnet";
"-k",
"/vertexai/private.json",
"-r",
"us-west1",
"us-central1",
"-x",
"4096",
"-t",
"0.0",
],
volumes: [
"./vertexai:/vertexai"
@ -29,7 +33,11 @@ local url = import "url.jsonnet";
"-k",
"/vertexai/private.json",
"-r",
"us-west1",
"us-central1",
"-x",
"4096",
"-t",
"0.0",
"-i",
"non-persistent://tg/request/text-completion-rag",
"-o",

View file

@ -0,0 +1,27 @@
local components = {
neo4j: import "components/neo4j.jsonnet",
cassandra: import "components/neo4j.jsonnet",
pulsar: import "components/pulsar.jsonnet",
milvus: import "components/milvus.jsonnet",
grafana: import "components/grafana.jsonnet",
trustgraph: import "components/trustgraph.jsonnet",
azure: import "components/azure.jsonnet",
bedrock: import "components/bedrock.jsonnet",
cohere: import "components/cohere.jsonnet",
claude: import "components/claude.jsonnet",
ollama: import "components/ollama.jsonnet",
openai: import "components/openai.jsonnet",
mix: import "components/mix.jsonnet",
vertexai: import "components/vertexai.jsonnet",
};
local options = std.split(std.extVar("options"), ",");
local add = function(state, name) state + components[name];
local config = std.foldl(add, options, {});
std.manifestYamlDoc(config)

View file

@ -229,14 +229,14 @@
- "text-completion-azure"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "${AZURE_TOKEN}"
- "-e"
- "${AZURE_ENDPOINT}"
- "-x"
- "4096"
- "-t"
- "0.0"
"image": "docker.io/trustgraph/trustgraph-flow:0.6.9"
"restart": "on-failure:100"
"text-completion-rag":
@ -244,15 +244,15 @@
- "text-completion-azure"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "${AZURE_TOKEN}"
- "-e"
- "${AZURE_ENDPOINT}"
- "-i"
- "-x"
- "4096"
- "-t"
- "0.0"
- "non-persistent://tg/request/text-completion-rag"
- "-o"
- "non-persistent://tg/response/text-completion-rag-response"

View file

@ -24,6 +24,7 @@
- "pulsar://pulsar:6650"
- "-m"
- "all-MiniLM-L6-v2"
"image": "docker.io/trustgraph/trustgraph-flow:0.6.9"
"restart": "on-failure:100"
"etcd":
"command":
@ -228,18 +229,18 @@
- "text-completion-bedrock"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
# - "-m"
# - "mistral.mixtral-8x7b-instruct-v0:1"
- "-z"
- "${AWS_ID_KEY}"
- "-k"
- "${AWS_SECRET_KEY}"
- "-r"
- "us-west-2"
- "-x"
- "4096"
- "-t"
- "0.0"
- "-m"
- "mistral.mixtral-8x7b-instruct-v0:1"
"image": "docker.io/trustgraph/trustgraph-flow:0.6.9"
"restart": "on-failure:100"
"text-completion-rag":
@ -247,18 +248,18 @@
- "text-completion-bedrock"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-x"
# - "0.0"
# - "-m"
# - "mistral.mixtral-8x7b-instruct-v0:1"
- "-z"
- "${AWS_ID_KEY}"
- "-k"
- "${AWS_SECRET_KEY}"
- "-r"
- "us-west-2"
- "-x"
- "4096"
- "-t"
- "0.0"
- "-m"
- "mistral.mixtral-8x7b-instruct-v0:1"
- "-i"
- "non-persistent://tg/request/text-completion-rag"
- "-o"

View file

@ -229,12 +229,12 @@
- "text-completion-claude"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "${CLAUDE_KEY}"
- "-x"
- "4096"
- "-t"
- "0.0"
"image": "docker.io/trustgraph/trustgraph-flow:0.6.9"
"restart": "on-failure:100"
"text-completion-rag":
@ -242,12 +242,12 @@
- "text-completion-claude"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "${CLAUDE_KEY}"
- "-x"
- "4096"
- "-t"
- "0.0"
- "-i"
- "non-persistent://tg/request/text-completion-rag"
- "-o"

View file

@ -229,10 +229,10 @@
- "text-completion-cohere"
- "-p"
- "pulsar://pulsar:6650"
# - "-t"
# - "0.0"
- "-k"
- "${COHERE_KEY}"
- "-t"
- "0.0"
"image": "docker.io/trustgraph/trustgraph-flow:0.6.9"
"restart": "on-failure:100"
"text-completion-rag":
@ -240,10 +240,10 @@
- "text-completion-cohere"
- "-p"
- "pulsar://pulsar:6650"
# - "-t"
# - "0.0"
- "-k"
- "${COHERE_KEY}"
- "-t"
- "0.0"
- "-i"
- "non-persistent://tg/request/text-completion-rag"
- "-o"

View file

@ -12,9 +12,9 @@
- "-p"
- "pulsar://pulsar:6650"
- "--chunk-size"
- "2000"
- "4000"
- "--chunk-overlap"
- "100"
- "120"
"image": "docker.io/trustgraph/trustgraph-flow:0.6.9"
"restart": "on-failure:100"
"embeddings":
@ -229,10 +229,6 @@
- "text-completion-cohere"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "${COHERE_KEY}"
- "-m"
@ -244,10 +240,6 @@
- "text-completion-cohere"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "${COHERE_KEY}"
- "-i"

View file

@ -229,10 +229,10 @@
- "text-completion-ollama"
- "-p"
- "pulsar://pulsar:6650"
- "-m"
- "gemma2:9b"
- "-r"
- "${OLLAMA_HOST}"
# - "-m"
# - "phi3.5:latest"
"image": "docker.io/trustgraph/trustgraph-flow:0.6.9"
"restart": "on-failure:100"
"text-completion-rag":
@ -240,10 +240,10 @@
- "text-completion-ollama"
- "-p"
- "pulsar://pulsar:6650"
- "-m"
- "gemma2:9b"
- "-r"
- "${OLLAMA_HOST}"
# - "-m"
# - "phi3.5:latest"
- "-i"
- "non-persistent://tg/request/text-completion-rag"
- "-o"

View file

@ -232,12 +232,12 @@
- "text-completion-openai"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "${OPENAI_KEY}"
- "-x"
- "4096"
- "-t"
- "0.0"
"image": "docker.io/trustgraph/trustgraph-flow:0.6.9"
"restart": "on-failure:100"
"text-completion-rag":
@ -245,12 +245,12 @@
- "text-completion-openai"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "${OPENAI_KEY}"
- "-x"
- "4096"
- "-t"
- "0.0"
- "-i"
- "non-persistent://tg/request/text-completion-rag"
- "-o"

View file

@ -229,12 +229,12 @@
- "text-completion-openai"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "${OPENAI_KEY}"
- "-x"
- "4096"
- "-t"
- "0.0"
"image": "docker.io/trustgraph/trustgraph-flow:0.6.9"
"restart": "on-failure:100"
"text-completion-rag":
@ -242,12 +242,12 @@
- "text-completion-openai"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "${OPENAI_KEY}"
- "-x"
- "4096"
- "-t"
- "0.0"
- "-i"
- "non-persistent://tg/request/text-completion-rag"
- "-o"

View file

@ -229,14 +229,14 @@
- "text-completion-vertexai"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "/vertexai/private.json"
- "-r"
- "us-central1"
- "-x"
- "4096"
- "-t"
- "0.0"
"image": "docker.io/trustgraph/trustgraph-flow:0.6.9"
"restart": "on-failure:100"
"volumes":
@ -246,14 +246,14 @@
- "text-completion-vertexai"
- "-p"
- "pulsar://pulsar:6650"
# - "-x"
# - "4096"
# - "-t"
# - "0.0"
- "-k"
- "/vertexai/private.json"
- "-r"
- "us-central1"
- "-x"
- "4096"
- "-t"
- "0.0"
- "-i"
- "non-persistent://tg/request/text-completion-rag"
- "-o"