Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions nodes/src/nodes/chroma/IGlobal.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@
# This class controls the data shared between all threads for the task
# ------------------------------------------------------------------------------
from rocketlib import OPEN_MODE
from ai.common.config import Config
from ai.common.transform import IGlobalTransform


class IGlobal(IGlobalTransform):
serverName: str = 'chroma'

def beginGlobal(self):
if self.IEndpoint.endpoint.openMode == OPEN_MODE.CONFIG:
# We are going to get a call to configureService but
Expand All @@ -47,6 +50,14 @@ def beginGlobal(self):
# Get the passed configuration
connConfig = self.getConnConfig()

# Resolve the namespace used for agent-facing tool names
# (chroma.search/upsert/delete). Read from the merged config
# so it honors both profile defaults and user overrides.
cfg = Config.getNodeConfig(self.glb.logicalType, connConfig)
resolved_name = cfg.get('serverName') if isinstance(cfg, dict) or hasattr(cfg, 'get') else None
if isinstance(resolved_name, str) and resolved_name.strip():
self.serverName = resolved_name.strip()

# Create the loader
self.store = Store(self.glb.logicalType, connConfig, bag)

Expand Down
3 changes: 2 additions & 1 deletion nodes/src/nodes/chroma/IInstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
from typing import List
from .IGlobal import IGlobal
from ai.common.schema import Doc, Question
from ai.common.store import VectorStoreToolMixin
from ai.common.transform import IInstanceTransform


class IInstance(IInstanceTransform):
class IInstance(VectorStoreToolMixin, IInstanceTransform):
IGlobal: IGlobal

def writeQuestions(self, question: Question):
Expand Down
24 changes: 17 additions & 7 deletions nodes/src/nodes/chroma/services.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
// Required:
// Class type of the node - what it does
//
"classType": ["store"],
"classType": ["store", "tool"],
//
// Required:
// Capabilities are flags that change the behavior of the underlying
// engine
// engine. "invoke" lets agents call the vector DB tools exposed via
// VectorStoreToolMixin (search, upsert, delete).
//
"capabilities": [],
"capabilities": ["invoke"],
//
// Optional:
// Register is either filter, endpoint or ignored if not specified. If the
Expand Down Expand Up @@ -168,15 +169,17 @@
"title": "Your own ChromaDB server",
"host": "localhost",
"port": "8000",
"collection": "ROCKETRIDE"
"collection": "ROCKETRIDE",
"serverName": "chroma"
},
"cloud": {
"mode": "cloud",
"title": "ChromaDB Cloud Server",
"host": "",
"port": "443",
"apikey": "",
"collection": "ROCKETRIDE"
"collection": "ROCKETRIDE",
"serverName": "chroma"
}
}
},
Expand All @@ -202,13 +205,20 @@
//
// Cloud configuration for ChromaDB
//
"chroma.serverName": {
"type": "string",
"title": "Tool Server Name",
"description": "Namespace for agent-facing tool names, e.g. 'chroma' exposes tools as chroma.search / chroma.upsert / chroma.delete. Change this when running multiple Chroma nodes in the same pipeline so their tool names do not collide.",
"default": "chroma",
"minLength": 1
},
"chroma.cloud": {
"object": "cloud",
"properties": ["vector.cloud.host", "vector.cloud.port", "vector.apikey", "vector.collection"]
"properties": ["vector.cloud.host", "vector.cloud.port", "vector.apikey", "vector.collection", "chroma.serverName"]
},
"chroma.local": {
"object": "local",
"properties": ["vector.local.host", "vector.local.port", "vector.collection"]
"properties": ["vector.local.host", "vector.local.port", "vector.collection", "chroma.serverName"]
},
//
// Profile selection for ChromaDB service
Expand Down
9 changes: 9 additions & 0 deletions nodes/src/nodes/pinecone/IGlobal.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
class IGlobal(IGlobalTransform):
# Class attributes - properly defined for IDE support
store: 'Store | None' = None
serverName: str = 'pinecone'

def beginGlobal(self):
"""
Expand All @@ -62,6 +63,14 @@ def beginGlobal(self):
# Get the passed configuration
connConfig = self.getConnConfig()

# Resolve the namespace used for agent-facing tool names
# (pinecone.search/upsert/delete). Read from the merged config
# so it honors both profile defaults and user overrides.
cfg = Config.getNodeConfig(self.glb.logicalType, connConfig)
resolved_name = cfg.get('serverName') if isinstance(cfg, dict) or hasattr(cfg, 'get') else None
if isinstance(resolved_name, str) and resolved_name.strip():
self.serverName = resolved_name.strip()

# Get the configuration
self.store = Store(self.glb.logicalType, connConfig, bag)

Expand Down
3 changes: 2 additions & 1 deletion nodes/src/nodes/pinecone/IInstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
from typing import List
from .IGlobal import IGlobal
from ai.common.schema import Doc, Question
from ai.common.store import VectorStoreToolMixin
from ai.common.transform import IInstanceTransform


class IInstance(IInstanceTransform):
class IInstance(VectorStoreToolMixin, IInstanceTransform):
IGlobal: IGlobal

def writeQuestions(self, question: Question):
Expand Down
24 changes: 17 additions & 7 deletions nodes/src/nodes/pinecone/services.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
// Required:
// Class type of the node - what it does
//
"classType": ["store"],
"classType": ["store", "tool"],
//
// Required:
// Capabilities are flags that change the behavior of the underlying
// engine
// engine. "invoke" lets agents call the vector DB tools exposed via
// VectorStoreToolMixin (search, upsert, delete).
//
"capabilities": [],
"capabilities": ["invoke"],
//
// Optional:
// Register is either filter, endpoint or ignored if not specified. If the
Expand Down Expand Up @@ -171,13 +172,15 @@
"mode": "pod-based",
"title": "Pinecone Pod-Based Index",
"apikey": "",
"collection": "rocketride"
"collection": "rocketride",
"serverName": "pinecone"
},
"serverless-dense": {
"mode": "serverless-dense",
"title": "Pinecone Serverless Dense Index",
"apikey": "",
"collection": "rocketride"
"collection": "rocketride",
"serverName": "pinecone"
}
}
},
Expand All @@ -194,13 +197,20 @@
"description": "Enter the name of the collection. Accepted are: Lower case, alphanumeric characters, hyphens",
"default": "rocketride"
},
"pinecone.serverName": {
"type": "string",
"title": "Tool Server Name",
"description": "Namespace for agent-facing tool names, e.g. 'pinecone' exposes tools as pinecone.search / pinecone.upsert / pinecone.delete. Change this when running multiple Pinecone nodes in the same pipeline so their tool names do not collide.",
"default": "pinecone",
"minLength": 1
},
"pinecone.pod-based": {
"object": "pod-based",
"properties": ["vector.apikey", "vector.score", "pinecone.collection"]
"properties": ["vector.apikey", "vector.score", "pinecone.collection", "pinecone.serverName"]
},
"pinecone.serverless-dense": {
"object": "serverless-dense",
"properties": ["vector.apikey", "vector.score", "pinecone.collection"]
"properties": ["vector.apikey", "vector.score", "pinecone.collection", "pinecone.serverName"]
},
"pinecone.profile": {
"title": "Type of Pinecone Connection",
Expand Down
10 changes: 10 additions & 0 deletions nodes/src/nodes/qdrant/IGlobal.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@


class IGlobal(IGlobalTransform):
serverName: str = 'qdrant'

def beginGlobal(self):
# Are we in config mode or some other mode?
if self.IEndpoint.endpoint.openMode == OPEN_MODE.CONFIG:
Expand All @@ -56,6 +58,14 @@ def beginGlobal(self):
# Get the passed configuration
connConfig = self.getConnConfig()

# Resolve the namespace used for agent-facing tool names
# (qdrant.search/upsert/delete). Read from the merged config
# so it honors both profile defaults and user overrides.
cfg = Config.getNodeConfig(self.glb.logicalType, connConfig)
resolved_name = cfg.get('serverName') if isinstance(cfg, dict) or hasattr(cfg, 'get') else None
if isinstance(resolved_name, str) and resolved_name.strip():
self.serverName = resolved_name.strip()

# Get the configuration
self.store = Store(self.glb.logicalType, connConfig, bag)

Expand Down
3 changes: 2 additions & 1 deletion nodes/src/nodes/qdrant/IInstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
from typing import List
from .IGlobal import IGlobal
from ai.common.schema import Doc, Question
from ai.common.store import VectorStoreToolMixin
from ai.common.transform import IInstanceTransform


class IInstance(IInstanceTransform):
class IInstance(VectorStoreToolMixin, IInstanceTransform):
IGlobal: IGlobal

def writeQuestions(self, question: Question):
Expand Down
24 changes: 17 additions & 7 deletions nodes/src/nodes/qdrant/services.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
// Required:
// Class type of the node - what it does
//
"classType": ["store"],
"classType": ["store", "tool"],
//
// Required:
// Capabilities are flags that change the behavior of the underlying
// engine
// engine. "invoke" lets agents call the vector DB tools exposed via
// VectorStoreToolMixin (search, upsert, delete).
//
"capabilities": [],
"capabilities": ["invoke"],
//
// Optional:
// Register is either filter, endpoint or ignored if not specified. If the
Expand Down Expand Up @@ -167,15 +168,17 @@
"title": "Your own Qdrant server",
"host": "localhost",
"port": 6333,
"collection": "ROCKETRIDE"
"collection": "ROCKETRIDE",
"serverName": "qdrant"
},
"cloud": {
"mode": "cloud",
"title": "Qdrant cloud server",
"host": "",
"port": 6333,
"apikey": "",
"collection": "ROCKETRIDE"
"collection": "ROCKETRIDE",
"serverName": "qdrant"
}
}
},
Expand All @@ -198,13 +201,20 @@
"vector.local.port": {
"default": 6333
},
"qdrant.serverName": {
"type": "string",
"title": "Tool Server Name",
"description": "Namespace for agent-facing tool names, e.g. 'qdrant' exposes tools as qdrant.search / qdrant.upsert / qdrant.delete. Change this when running multiple Qdrant nodes in the same pipeline so their tool names do not collide.",
"default": "qdrant",
"minLength": 1
},
"qdrant.cloud": {
"object": "cloud",
"properties": ["vector.cloud.host", "vector.cloud.port", "vector.apikey", "vector.score", "vector.collection"]
"properties": ["vector.cloud.host", "vector.cloud.port", "vector.apikey", "vector.score", "vector.collection", "qdrant.serverName"]
},
"qdrant.local": {
"object": "local",
"properties": ["vector.local.host", "vector.local.port", "vector.score", "vector.collection"]
"properties": ["vector.local.host", "vector.local.port", "vector.score", "vector.collection", "qdrant.serverName"]
},
"qdrant.profile": {
"title": "Type of Qdrant host",
Expand Down
Loading
Loading