mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-03 12:22:37 +02:00
Simplify templates (#10)
- Add component template files for all LLM types - Top-level templates simplified to use just components - Version to 0.6.2
This commit is contained in:
parent
d3e213f194
commit
fa0b89b5d4
30 changed files with 502 additions and 520 deletions
38
templates/components/azure.jsonnet
Normal file
38
templates/components/azure.jsonnet
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
local base = import "base.jsonnet";
|
||||
local images = import "images.jsonnet";
|
||||
local url = import "url.jsonnet";
|
||||
{
|
||||
services +: {
|
||||
|
||||
"text-completion": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-azure",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"${AZURE_TOKEN}",
|
||||
"-e",
|
||||
"${AZURE_ENDPOINT}",
|
||||
],
|
||||
},
|
||||
|
||||
"text-completion-rag": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-azure",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"${AZURE_TOKEN}",
|
||||
"-e",
|
||||
"${AZURE_ENDPOINT}",
|
||||
"-i",
|
||||
"non-persistent://tg/request/text-completion-rag",
|
||||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag-response",
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
57
templates/components/bedrock.jsonnet
Normal file
57
templates/components/bedrock.jsonnet
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
local base = import "base.jsonnet";
|
||||
local images = import "images.jsonnet";
|
||||
local url = import "url.jsonnet";
|
||||
{
|
||||
services +: {
|
||||
|
||||
chunker: base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"chunker-recursive",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"--chunk-size",
|
||||
"2000",
|
||||
"--chunk-overlap",
|
||||
"100",
|
||||
],
|
||||
},
|
||||
|
||||
"text-completion": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-bedrock",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-z",
|
||||
"${AWS_ID_KEY}",
|
||||
"-k",
|
||||
"${AWS_SECRET_KEY}",
|
||||
"-r",
|
||||
"us-west-2",
|
||||
],
|
||||
},
|
||||
|
||||
"text-completion-rag": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-bedrock",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
// "-m",
|
||||
// "mistral.mistral-large-2407-v1:0",
|
||||
"-z",
|
||||
"${AWS_ID_KEY}",
|
||||
"-k",
|
||||
"${AWS_SECRET_KEY}",
|
||||
"-r",
|
||||
"us-west-2",
|
||||
"-i",
|
||||
"non-persistent://tg/request/text-completion-rag",
|
||||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag-response",
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
|
@ -1,10 +1,13 @@
|
|||
local base = import "base.jsonnet";
|
||||
local images = import "images.jsonnet";
|
||||
local url = import "url.jsonnet";
|
||||
local cassandra_hosts = "cassandra";
|
||||
{
|
||||
volumes +: {
|
||||
cassandra: {},
|
||||
},
|
||||
services +: {
|
||||
|
||||
cassandra: base + {
|
||||
image: images.cassandra,
|
||||
ports: [
|
||||
|
|
@ -13,6 +16,29 @@ local images = import "images.jsonnet";
|
|||
volumes: [
|
||||
"cassandra:/var/lib/cassandra"
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
"store-triples": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"triples-write-cassandra",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-g",
|
||||
cassandra_hosts,
|
||||
],
|
||||
},
|
||||
|
||||
"query-triples": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"triples-query-cassandra",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-g",
|
||||
cassandra_hosts,
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
|
|
|||
34
templates/components/claude.jsonnet
Normal file
34
templates/components/claude.jsonnet
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
local base = import "base.jsonnet";
|
||||
local images = import "images.jsonnet";
|
||||
local url = import "url.jsonnet";
|
||||
{
|
||||
services +: {
|
||||
|
||||
"text-completion": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-claude",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"${CLAUDE_KEY}",
|
||||
],
|
||||
},
|
||||
|
||||
"text-completion-rag": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-claude",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"${CLAUDE_KEY}",
|
||||
"-i",
|
||||
"non-persistent://tg/request/text-completion-rag",
|
||||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag-response",
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
47
templates/components/cohere.jsonnet
Normal file
47
templates/components/cohere.jsonnet
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
local base = import "base.jsonnet";
|
||||
local images = import "images.jsonnet";
|
||||
local url = import "url.jsonnet";
|
||||
{
|
||||
services +: {
|
||||
|
||||
chunker: base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"chunker-recursive",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"--chunk-size",
|
||||
"1000",
|
||||
"--chunk-overlap",
|
||||
"50",
|
||||
],
|
||||
},
|
||||
|
||||
"text-completion": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-cohere",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"${COHERE_KEY}",
|
||||
],
|
||||
},
|
||||
|
||||
"text-completion-rag": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-cohere",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"${COHERE_KEY}",
|
||||
"-i",
|
||||
"non-persistent://tg/request/text-completion-rag",
|
||||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag-response",
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
|
@ -1,10 +1,14 @@
|
|||
local base = import "base.jsonnet";
|
||||
local images = import "images.jsonnet";
|
||||
local url = import "url.jsonnet";
|
||||
{
|
||||
|
||||
volumes +: {
|
||||
neo4j: {},
|
||||
},
|
||||
|
||||
services +: {
|
||||
|
||||
neo4j: base + {
|
||||
image: images.neo4j,
|
||||
ports: [
|
||||
|
|
@ -20,6 +24,30 @@ local images = import "images.jsonnet";
|
|||
volumes: [
|
||||
"neo4j:/data"
|
||||
],
|
||||
},
|
||||
|
||||
"query-triples": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"triples-query-neo4j",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-g",
|
||||
"bolt://neo4j:7687",
|
||||
],
|
||||
},
|
||||
|
||||
"store-triples": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"triples-write-neo4j",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-g",
|
||||
"bolt://neo4j:7687",
|
||||
],
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
|
|
|||
38
templates/components/ollama.jsonnet
Normal file
38
templates/components/ollama.jsonnet
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
local base = import "base.jsonnet";
|
||||
local images = import "images.jsonnet";
|
||||
local url = import "url.jsonnet";
|
||||
{
|
||||
services +: {
|
||||
|
||||
"text-completion": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-ollama",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
// "-m",
|
||||
// "llama3.1:8b",
|
||||
"-r",
|
||||
"${OLLAMA_HOST}",
|
||||
],
|
||||
},
|
||||
|
||||
"text-completion-rag": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-ollama",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
// "-m",
|
||||
// "llama3.1:8b",
|
||||
"-r",
|
||||
"${OLLAMA_HOST}",
|
||||
"-i",
|
||||
"non-persistent://tg/request/text-completion-rag",
|
||||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag-response",
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
34
templates/components/openai.jsonnet
Normal file
34
templates/components/openai.jsonnet
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
local base = import "base.jsonnet";
|
||||
local images = import "images.jsonnet";
|
||||
local url = import "url.jsonnet";
|
||||
{
|
||||
services +: {
|
||||
|
||||
"text-completion": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-openai",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"${OPENAI_KEY}",
|
||||
],
|
||||
},
|
||||
|
||||
"text-completion-rag": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-openai",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"${OPENAI_KEY}",
|
||||
"-i",
|
||||
"non-persistent://tg/request/text-completion-rag",
|
||||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag-response",
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
|
@ -5,8 +5,6 @@ local images = import "images.jsonnet";
|
|||
|
||||
local url = import "url.jsonnet";
|
||||
|
||||
local cassandra_hosts = "cassandra";
|
||||
|
||||
{
|
||||
services +: {
|
||||
|
||||
|
|
@ -88,28 +86,6 @@ local cassandra_hosts = "cassandra";
|
|||
],
|
||||
},
|
||||
|
||||
"store-triples": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"triples-write-cassandra",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-g",
|
||||
cassandra_hosts,
|
||||
],
|
||||
},
|
||||
|
||||
"query-triples": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"triples-query-cassandra",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-g",
|
||||
cassandra_hosts,
|
||||
],
|
||||
},
|
||||
|
||||
"graph-rag": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
|
|
|
|||
1
templates/components/version.jsonnet
Normal file
1
templates/components/version.jsonnet
Normal file
|
|
@ -0,0 +1 @@
|
|||
"0.6.2"
|
||||
44
templates/components/vertexai.jsonnet
Normal file
44
templates/components/vertexai.jsonnet
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
local base = import "base.jsonnet";
|
||||
local images = import "images.jsonnet";
|
||||
local url = import "url.jsonnet";
|
||||
{
|
||||
services +: {
|
||||
|
||||
"text-completion": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-vertexai",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"/vertexai/private.json",
|
||||
"-r",
|
||||
"us-west1",
|
||||
],
|
||||
volumes: [
|
||||
"./vertexai:/vertexai"
|
||||
],
|
||||
},
|
||||
|
||||
"text-completion-rag": base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"text-completion-vertexai",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-k",
|
||||
"/vertexai/private.json",
|
||||
"-r",
|
||||
"us-west1",
|
||||
"-i",
|
||||
"non-persistent://tg/request/text-completion-rag",
|
||||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag-response",
|
||||
],
|
||||
volumes: [
|
||||
"./vertexai:/vertexai"
|
||||
],
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue