From 57663742e6603f64ce44d7fc2675fadf072962fb Mon Sep 17 00:00:00 2001 From: cybermaggedon Date: Thu, 27 Mar 2025 15:17:08 +0000 Subject: [PATCH] Fix bedrock: (#331) - Fix missing await - Fix missing error response --- .../trustgraph/model/text_completion/bedrock/llm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trustgraph-bedrock/trustgraph/model/text_completion/bedrock/llm.py b/trustgraph-bedrock/trustgraph/model/text_completion/bedrock/llm.py index 75868b56..9b8818a2 100755 --- a/trustgraph-bedrock/trustgraph/model/text_completion/bedrock/llm.py +++ b/trustgraph-bedrock/trustgraph/model/text_completion/bedrock/llm.py @@ -302,7 +302,7 @@ class Processor(ConsumerProducer): model=str(self.model), ) - self.send(r, properties={"id": id}) + await self.send(r, properties={"id": id}) print("Done.", flush=True) @@ -333,6 +333,8 @@ class Processor(ConsumerProducer): model=None, ) + await self.send(r, properties={"id": id}) + self.consumer.acknowledge(msg) @staticmethod