mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-08 22:35:14 +02:00
Merge branch 'release/v1.4'
This commit is contained in:
commit
c9b1f2f038
4 changed files with 20 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue