mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-26 07:45:13 +02:00
Fix timeouts (#37)
* Fix other timeout default settings * Add storage-only YAML output * Bump version
This commit is contained in:
parent
a83c623ca3
commit
cea8562ecf
24 changed files with 754 additions and 224 deletions
|
|
@ -74,7 +74,7 @@ class BaseClient:
|
|||
while time.time() < end_time:
|
||||
|
||||
try:
|
||||
msg = self.consumer.receive(timeout_millis=5000)
|
||||
msg = self.consumer.receive(timeout_millis=2500)
|
||||
except pulsar.exceptions.Timeout:
|
||||
continue
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class EmbeddingsClient(BaseClient):
|
|||
output_schema=EmbeddingsResponse,
|
||||
)
|
||||
|
||||
def request(self, text, timeout=30):
|
||||
def request(self, text, timeout=300):
|
||||
return self.call(text=text, timeout=timeout).vectors
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class GraphEmbeddingsClient(BaseClient):
|
|||
output_schema=GraphEmbeddingsResponse,
|
||||
)
|
||||
|
||||
def request(self, vectors, limit=10, timeout=30):
|
||||
def request(self, vectors, limit=10, timeout=300):
|
||||
return self.call(
|
||||
vectors=vectors, limit=limit, timeout=timeout
|
||||
).entities
|
||||
|
|
|
|||
|
|
@ -35,6 +35,6 @@ class LlmClient(BaseClient):
|
|||
output_schema=TextCompletionResponse,
|
||||
)
|
||||
|
||||
def request(self, prompt, timeout=30):
|
||||
def request(self, prompt, timeout=300):
|
||||
return self.call(prompt=prompt, timeout=timeout).response
|
||||
|
||||
|
|
|
|||
|
|
@ -38,17 +38,21 @@ class PromptClient(BaseClient):
|
|||
output_schema=PromptResponse,
|
||||
)
|
||||
|
||||
def request_definitions(self, chunk, timeout=30):
|
||||
def request_definitions(self, chunk, timeout=300):
|
||||
|
||||
return self.call(kind="extract-definitions", chunk=chunk,
|
||||
timeout=timeout).definitions
|
||||
return self.call(
|
||||
kind="extract-definitions", chunk=chunk,
|
||||
timeout=timeout
|
||||
).definitions
|
||||
|
||||
def request_relationships(self, chunk, timeout=30):
|
||||
def request_relationships(self, chunk, timeout=300):
|
||||
|
||||
return self.call(kind="extract-relationships", chunk=chunk,
|
||||
timeout=timeout).relationships
|
||||
return self.call(
|
||||
kind="extract-relationships", chunk=chunk,
|
||||
timeout=timeout
|
||||
).relationships
|
||||
|
||||
def request_kg_prompt(self, query, kg, timeout=30):
|
||||
def request_kg_prompt(self, query, kg, timeout=300):
|
||||
|
||||
return self.call(
|
||||
kind="kg-prompt",
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class TriplesQueryClient(BaseClient):
|
|||
|
||||
return Value(value=ent, is_uri=False)
|
||||
|
||||
def request(self, s, p, o, limit=10, timeout=30):
|
||||
def request(self, s, p, o, limit=10, timeout=60):
|
||||
return self.call(
|
||||
s=self.create_value(s),
|
||||
p=self.create_value(p),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue