diff --git a/public/pinecone.svg b/public/pinecone.svg new file mode 100644 index 0000000..891b03f --- /dev/null +++ b/public/pinecone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/simple-editor/model-params/GraphStore.tsx b/src/simple-editor/model-params/GraphStore.tsx index 2f64b55..2cdda5e 100644 --- a/src/simple-editor/model-params/GraphStore.tsx +++ b/src/simple-editor/model-params/GraphStore.tsx @@ -96,6 +96,7 @@ const GraphStore: React.FC = ({ value, onChange }) => { + diff --git a/src/simple-editor/model-params/VectorDB.tsx b/src/simple-editor/model-params/VectorDB.tsx index 8cfe4c9..957ca98 100644 --- a/src/simple-editor/model-params/VectorDB.tsx +++ b/src/simple-editor/model-params/VectorDB.tsx @@ -15,13 +15,14 @@ const VectorDB: React.FC = ({ value, onChange }) => { - Vector DB + Vector DB + + ); diff --git a/templates/components.jsonnet b/templates/components.jsonnet index ec7f862..26368de 100644 --- a/templates/components.jsonnet +++ b/templates/components.jsonnet @@ -25,6 +25,7 @@ "trustgraph-base": import "components/trustgraph.jsonnet", "vector-store-milvus": import "components/milvus.jsonnet", "vector-store-qdrant": import "components/qdrant.jsonnet", + "vector-store-pinecone": import "components/pinecone.jsonnet", "vertexai": import "components/vertexai.jsonnet", "null": {}, @@ -34,6 +35,7 @@ "cassandra": import "components/cassandra.jsonnet", "neo4j": import "components/neo4j.jsonnet", "qdrant": import "components/qdrant.jsonnet", + "pinecone": import "components/pinecone.jsonnet", "milvus": import "components/milvus.jsonnet", "trustgraph": import "components/trustgraph.jsonnet", diff --git a/templates/components/pinecone.jsonnet b/templates/components/pinecone.jsonnet new file mode 100644 index 0000000..3422952 --- /dev/null +++ b/templates/components/pinecone.jsonnet @@ -0,0 +1,153 @@ +local base = import "base/base.jsonnet"; +local images = import "values/images.jsonnet"; +local url = import "values/url.jsonnet"; +local cassandra_hosts = "cassandra"; + +{ + + "pinecone-cloud":: "aws", + "pinecone-region":: "us-east-1", + + "store-graph-embeddings" +: { + + create:: function(engine) + + local envSecrets = engine.envSecrets("pinecone-api-key") + .with_env_var("PINECONE_API_KEY", "pinecone-api-key"); + + local container = + engine.container("store-graph-embeddings") + .with_image(images.trustgraph) + .with_command([ + "ge-write-pinecone", + "-p", + url.pulsar, + ]) + .with_env_var_secrets(envSecrets) + .with_limits("0.5", "128M") + .with_reservations("0.1", "128M"); + + local containerSet = engine.containers( + "store-graph-embeddings", [ container ] + ); + + local service = + engine.internalService(containerSet) + .with_port(8080, 8080, "metrics"); + + engine.resources([ + envSecrets, + containerSet, + service, + ]) + + }, + + "query-graph-embeddings" +: { + + create:: function(engine) + + local envSecrets = engine.envSecrets("pinecone-api-key") + .with_env_var("PINECONE_API_KEY", "pinecone-api-key"); + + local container = + engine.container("query-graph-embeddings") + .with_image(images.trustgraph) + .with_command([ + "ge-query-pinecone", + "-p", + url.pulsar, + ]) + .with_env_var_secrets(envSecrets) + .with_limits("0.5", "128M") + .with_reservations("0.1", "128M"); + + local containerSet = engine.containers( + "query-graph-embeddings", [ container ] + ); + + local service = + engine.internalService(containerSet) + .with_port(8080, 8080, "metrics"); + + engine.resources([ + envSecrets, + containerSet, + service, + ]) + + }, + + "store-doc-embeddings" +: { + + create:: function(engine) + + local envSecrets = engine.envSecrets("pinecone-api-key") + .with_env_var("PINECONE_API_KEY", "pinecone-api-key"); + + local container = + engine.container("store-doc-embeddings") + .with_image(images.trustgraph) + .with_command([ + "de-write-pinecone", + "-p", + url.pulsar, + ]) + .with_env_var_secrets(envSecrets) + .with_limits("0.5", "128M") + .with_reservations("0.1", "128M"); + + local containerSet = engine.containers( + "store-doc-embeddings", [ container ] + ); + + local service = + engine.internalService(containerSet) + .with_port(8080, 8080, "metrics"); + + engine.resources([ + envSecrets, + containerSet, + service, + ]) + + }, + + "query-doc-embeddings" +: { + + create:: function(engine) + + local envSecrets = engine.envSecrets("pinecone-api-key") + .with_env_var("PINECONE_API_KEY", "pinecone-api-key"); + + local container = + engine.container("query-doc-embeddings") + .with_image(images.trustgraph) + .with_command([ + "de-query-pinecone", + "-p", + url.pulsar, + ]) + .with_env_var_secrets(envSecrets) + .with_limits("0.5", "128M") + .with_reservations("0.1", "128M"); + + local containerSet = engine.containers( + "query-doc-embeddings", [ container ] + ); + + local service = + engine.internalService(containerSet) + .with_port(8080, 8080, "metrics"); + + engine.resources([ + envSecrets, + containerSet, + service, + ]) + + + } + +} +