diff --git a/cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/openai/adapter.py b/cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/openai/adapter.py index 8a0109d99..7ea9dedaa 100644 --- a/cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/openai/adapter.py +++ b/cognee/infrastructure/llm/structured_output_framework/litellm_instructor/llm/openai/adapter.py @@ -73,8 +73,10 @@ class OpenAIAdapter(LLMInterface): fallback_api_key: str = None, fallback_endpoint: str = None, ): - self.aclient = instructor.from_litellm(litellm.acompletion, mode=instructor.Mode.JSON) - self.client = instructor.from_litellm(litellm.completion, mode=instructor.Mode.JSON) + self.aclient = instructor.from_litellm( + litellm.acompletion, mode=instructor.Mode.JSON_SCHEMA + ) + self.client = instructor.from_litellm(litellm.completion, mode=instructor.Mode.JSON_SCHEMA) self.transcription_model = transcription_model self.model = model self.api_key = api_key