fix: Add fix for getting transcription of audio and image from LLMs

Enable getting of text from audio and image files from LLMs

Fix
This commit is contained in:
Igor Ilic 2024-11-25 17:32:11 +01:00
parent ec6b0a40e0
commit 66c321f206

View file

@ -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,
)