Merge branch 'release/v1.4'

This commit is contained in:
Cyber MacGeddon 2025-10-11 11:43:26 +01:00
commit c9b1f2f038
4 changed files with 20 additions and 2 deletions

View file

@ -76,6 +76,12 @@ class Processor(ChunkingService):
self.default_chunk_overlap
)
# Convert to int if they're strings (flow parameters are always strings)
if isinstance(chunk_size, str):
chunk_size = int(chunk_size)
if isinstance(chunk_overlap, str):
chunk_overlap = int(chunk_overlap)
# Create text splitter with effective parameters
text_splitter = RecursiveCharacterTextSplitter(
chunk_size=chunk_size,

View file

@ -75,6 +75,12 @@ class Processor(ChunkingService):
self.default_chunk_overlap
)
# Convert to int if they're strings (flow parameters are always strings)
if isinstance(chunk_size, str):
chunk_size = int(chunk_size)
if isinstance(chunk_overlap, str):
chunk_overlap = int(chunk_overlap)
# Create text splitter with effective parameters
text_splitter = TokenTextSplitter(
encoding_name="cl100k_base",

View file

@ -61,6 +61,10 @@ class Processor(DocumentEmbeddingsQueryService):
"""Check if collection exists (no implicit creation)"""
return self.qdrant.collection_exists(collection)
def collection_exists(self, collection):
"""Check if collection exists (no implicit creation)"""
return self.qdrant.collection_exists(collection)
async def query_document_embeddings(self, msg):
try:

View file

@ -61,6 +61,10 @@ class Processor(GraphEmbeddingsQueryService):
"""Check if collection exists (no implicit creation)"""
return self.qdrant.collection_exists(collection)
def collection_exists(self, collection):
"""Check if collection exists (no implicit creation)"""
return self.qdrant.collection_exists(collection)
def create_value(self, ent):
if ent.startswith("http://") or ent.startswith("https://"):
return Value(value=ent, is_uri=True)
@ -85,8 +89,6 @@ class Processor(GraphEmbeddingsQueryService):
for vec in msg.vectors:
self.ensure_collection_exists(collection, dim)
# Heuristic hack, get (2*limit), so that we have more chance
# of getting (limit) entities
search_result = self.qdrant.query_points(