mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 00:16:23 +02:00
Fix merge issues with api-key, conflicts with librarian changes (#309)
This commit is contained in:
parent
617eb7efd5
commit
5575e885e5
11 changed files with 8 additions and 23 deletions
|
|
@ -220,7 +220,7 @@ class Processor(ConsumerProducer):
|
|||
|
||||
print(f"History: {history}", flush=True)
|
||||
|
||||
def think(x):
|
||||
async def think(x):
|
||||
|
||||
print(f"Think: {x}", flush=True)
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ class Processor(ConsumerProducer):
|
|||
|
||||
await self.producer.send(r, properties={"id": id})
|
||||
|
||||
def observe(x):
|
||||
async def observe(x):
|
||||
|
||||
print(f"Observe: {x}", flush=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,18 +7,10 @@ from . endpoint import ServiceEndpoint
|
|||
from . requestor import ServiceRequestor
|
||||
|
||||
class AgentRequestor(ServiceRequestor):
|
||||
<<<<<<< HEAD
|
||||
def __init__(self, pulsar_client, timeout, auth):
|
||||
|
||||
super(AgentRequestor, self).__init__(
|
||||
pulsar_client=pulsar_client,
|
||||
=======
|
||||
def __init__(self, pulsar_host, timeout, auth, pulsar_api_key=None):
|
||||
|
||||
super(AgentRequestor, self).__init__(
|
||||
pulsar_host=pulsar_host,
|
||||
pulsar_api_key=pulsar_api_key,
|
||||
>>>>>>> a5d5b4c (Add pulsar API token check)
|
||||
request_queue=agent_request_queue,
|
||||
response_queue=agent_response_queue,
|
||||
request_schema=AgentRequest,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ class DocumentEmbeddingsStreamEndpoint(SocketEndpoint):
|
|||
self.pulsar_client, document_embeddings_store_queue,
|
||||
"api-gateway", "api-gateway",
|
||||
schema=JsonSchema(DocumentEmbeddings),
|
||||
pulsar_api_key=self.pulsar_api_key
|
||||
)
|
||||
|
||||
async def listener(self, ws, running):
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ class GraphEmbeddingsStreamEndpoint(SocketEndpoint):
|
|||
self.subscriber = Subscriber(
|
||||
self.pulsar_client, graph_embeddings_store_queue,
|
||||
"api-gateway", "api-gateway",
|
||||
pulsar_api_key=self.pulsar_api_key,
|
||||
schema=JsonSchema(GraphEmbeddings)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ class MuxEndpoint(SocketEndpoint):
|
|||
self, pulsar_client, auth,
|
||||
services,
|
||||
path="/api/v1/socket",
|
||||
pulsar_api_key=None
|
||||
):
|
||||
|
||||
super(MuxEndpoint, self).__init__(
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ class ServiceRequestor:
|
|||
response_queue, response_schema,
|
||||
subscription="api-gateway", consumer_name="api-gateway",
|
||||
timeout=600,
|
||||
pulsar_api_key=None,
|
||||
):
|
||||
|
||||
self.pub = Publisher(
|
||||
|
|
@ -30,7 +29,6 @@ class ServiceRequestor:
|
|||
self.sub = Subscriber(
|
||||
pulsar_client, response_queue,
|
||||
subscription, consumer_name,
|
||||
pulsar_api_key,
|
||||
JsonSchema(response_schema)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ class ServiceSender:
|
|||
self,
|
||||
pulsar_client,
|
||||
request_queue, request_schema,
|
||||
pulsar_api_key=None,
|
||||
):
|
||||
|
||||
self.pub = Publisher(
|
||||
|
|
|
|||
|
|
@ -234,7 +234,6 @@ class Api:
|
|||
TriplesLoadEndpoint(
|
||||
pulsar_client=self.pulsar_client,
|
||||
auth = self.auth,
|
||||
pulsar_api_key=self.pulsar_api_key,
|
||||
),
|
||||
GraphEmbeddingsLoadEndpoint(
|
||||
pulsar_client=self.pulsar_client,
|
||||
|
|
@ -248,7 +247,6 @@ class Api:
|
|||
pulsar_client=self.pulsar_client,
|
||||
auth = self.auth,
|
||||
services = self.services,
|
||||
pulsar_api_key=self.pulsar_api_key,
|
||||
),
|
||||
MetricsEndpoint(
|
||||
endpoint_path = "/api/v1/metrics",
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ class TriplesStreamEndpoint(SocketEndpoint):
|
|||
self.subscriber = Subscriber(
|
||||
self.pulsar_client, triples_store_queue,
|
||||
"api-gateway", "api-gateway",
|
||||
pulsar_api_key=self.pulsar_api_key,
|
||||
schema=JsonSchema(Triples)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ class GraphRag:
|
|||
|
||||
self.ge_client = GraphEmbeddingsClient(
|
||||
pulsar_host=pulsar_host,
|
||||
pulsar_api_key=-pulsar_api_key,
|
||||
pulsar_api_key=pulsar_api_key,
|
||||
subscriber=module + "-ge",
|
||||
input_queue=ge_request_queue,
|
||||
output_queue=ge_response_queue,
|
||||
|
|
@ -216,7 +216,7 @@ class GraphRag:
|
|||
|
||||
self.triples_client = TriplesQueryClient(
|
||||
pulsar_host=pulsar_host,
|
||||
pulsar_api_key=-pulsar_api_key,
|
||||
pulsar_api_key=pulsar_api_key,
|
||||
subscriber=module + "-tpl",
|
||||
input_queue=tpl_request_queue,
|
||||
output_queue=tpl_response_queue
|
||||
|
|
@ -224,7 +224,7 @@ class GraphRag:
|
|||
|
||||
self.embeddings = EmbeddingsClient(
|
||||
pulsar_host=pulsar_host,
|
||||
pulsar_api_key=-pulsar_api_key,
|
||||
pulsar_api_key=pulsar_api_key,
|
||||
input_queue=emb_request_queue,
|
||||
output_queue=emb_response_queue,
|
||||
subscriber=module + "-emb",
|
||||
|
|
@ -238,7 +238,7 @@ class GraphRag:
|
|||
|
||||
self.prompt = PromptClient(
|
||||
pulsar_host=pulsar_host,
|
||||
pulsar_api_key=-pulsar_api_key,
|
||||
pulsar_api_key=pulsar_api_key,
|
||||
input_queue=pr_request_queue,
|
||||
output_queue=pr_response_queue,
|
||||
subscriber=module + "-prompt",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue