mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-22 11:41:02 +02:00
Tweaking
This commit is contained in:
parent
8d082aed87
commit
42ea9ed370
3 changed files with 5 additions and 4 deletions
|
|
@ -12,7 +12,6 @@ from .. schema import config_request_queue, config_response_queue
|
|||
from .. schema import config_push_queue
|
||||
from .. log_level import LogLevel
|
||||
from . async_processor import AsyncProcessor
|
||||
from . subscriber import Subscriber
|
||||
from . flow import Flow
|
||||
|
||||
# Parent class for configurable processors, configured with flows by
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ class RequestResponse(Subscriber):
|
|||
|
||||
id = str(uuid.uuid4())
|
||||
|
||||
print("Request", id, "...", flush=True)
|
||||
|
||||
q = await self.subscribe(id)
|
||||
|
||||
try:
|
||||
|
|
@ -58,6 +60,8 @@ class RequestResponse(Subscriber):
|
|||
timeout=timeout
|
||||
)
|
||||
|
||||
print("Got response.", flush=True)
|
||||
|
||||
return resp
|
||||
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -58,12 +58,10 @@ class Processor(FlowProcessor):
|
|||
|
||||
for entity in v.entities:
|
||||
|
||||
resp = await flow("embeddings-request").embed(
|
||||
vectors = await flow("embeddings-request").embed(
|
||||
text = entity.context
|
||||
)
|
||||
|
||||
vectors = resp.vectors
|
||||
|
||||
entities.append(
|
||||
EntityEmbeddings(
|
||||
entity=entity.entity,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue