From 5527b6e0b339f7e3f4fab57a380d43ea5549652c Mon Sep 17 00:00:00 2001 From: vasilije Date: Sun, 12 Oct 2025 11:47:40 +0200 Subject: [PATCH] format done --- .../litellm_instructor/llm/mistral/adapter.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/mistral/adapter.py b/cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/mistral/adapter.py index dbf0322b1..c4e51b70b 100644 --- a/cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/mistral/adapter.py +++ b/cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/mistral/adapter.py @@ -68,16 +68,16 @@ class MistralAdapter(LLMInterface): """ try: messages = [ - { - "role": "system", - "content": system_prompt, - }, - { - "role": "user", - "content": f"""Use the given format to extract information + { + "role": "system", + "content": system_prompt, + }, + { + "role": "user", + "content": f"""Use the given format to extract information from the following input: {text_input}""", - }, - ] + }, + ] try: response = await self.aclient.chat.completions.create( model=self.model, @@ -94,7 +94,7 @@ class MistralAdapter(LLMInterface): except litellm.exceptions.BadRequestError as e: logger.error(f"Bad request error: {str(e)}") raise ValueError(f"Invalid request: {str(e)}") - + except JSONSchemaValidationError as e: logger.error(f"Schema validation failed: {str(e)}") logger.debug(f"Raw response: {e.raw_response}")