From 66c321f206a10e1191a7cdedc191cbecd22cc0f5 Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Mon, 25 Nov 2024 17:32:11 +0100 Subject: [PATCH] fix: Add fix for getting transcription of audio and image from LLMs Enable getting of text from audio and image files from LLMs Fix --- cognee/infrastructure/llm/openai/adapter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cognee/infrastructure/llm/openai/adapter.py b/cognee/infrastructure/llm/openai/adapter.py index 28cdfff4e..1dc9b70f5 100644 --- a/cognee/infrastructure/llm/openai/adapter.py +++ b/cognee/infrastructure/llm/openai/adapter.py @@ -87,6 +87,9 @@ class OpenAIAdapter(LLMInterface): transcription = litellm.transcription( model = self.transcription_model, file = Path(input), + api_key=self.api_key, + api_base=self.endpoint, + api_version=self.api_version, max_retries = 5, ) @@ -112,6 +115,9 @@ class OpenAIAdapter(LLMInterface): }, ], }], + api_key=self.api_key, + api_base=self.endpoint, + api_version=self.api_version, max_tokens = 300, max_retries = 5, )