From cf0eb5a1b26a5aac707236cdeaeea1cc660f7e43 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Tue, 6 May 2025 16:14:45 +0100 Subject: [PATCH] Fix Mistral --- trustgraph-flow/trustgraph/model/text_completion/cohere/llm.py | 2 ++ trustgraph-flow/trustgraph/model/text_completion/mistral/llm.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/trustgraph-flow/trustgraph/model/text_completion/cohere/llm.py b/trustgraph-flow/trustgraph/model/text_completion/cohere/llm.py index d6b2b971..8e583040 100755 --- a/trustgraph-flow/trustgraph/model/text_completion/cohere/llm.py +++ b/trustgraph-flow/trustgraph/model/text_completion/cohere/llm.py @@ -70,6 +70,8 @@ class Processor(LlmService): model = self.model ) + return resp + # FIXME: Wrong exception, don't know what this LLM throws # for a rate limit except cohere.TooManyRequestsError: diff --git a/trustgraph-flow/trustgraph/model/text_completion/mistral/llm.py b/trustgraph-flow/trustgraph/model/text_completion/mistral/llm.py index 93eccb35..0c5c1430 100755 --- a/trustgraph-flow/trustgraph/model/text_completion/mistral/llm.py +++ b/trustgraph-flow/trustgraph/model/text_completion/mistral/llm.py @@ -86,6 +86,8 @@ class Processor(LlmService): model = self.model ) + return resp + # FIXME: Wrong exception. The MistralAI library has retry logic # so retry-able errors are retried transparently. It means we # don't get rate limit events.