fix: Add fix for getting transcription of audio and image from LLMs (#24)

Enable getting of text from audio and image files from LLMs

Fix
This commit is contained in:
Vasilije 2024-11-25 17:51:38 +01:00 committed by GitHub
commit dfd30d8e54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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