feat: claude api support (#572)

This commit is contained in:
John Wang
2023-07-17 00:14:19 +08:00
committed by GitHub
parent 510389909c
commit 7599f79a17
52 changed files with 637 additions and 349 deletions

View File

@@ -27,7 +27,7 @@ class AudioService:
message = f"Audio size larger than {FILE_SIZE} mb"
raise AudioTooLargeServiceError(message)
provider_name = LLMBuilder.get_default_provider(tenant_id)
provider_name = LLMBuilder.get_default_provider(tenant_id, 'whisper-1')
if provider_name != ProviderName.OPENAI.value:
raise ProviderNotSupportSpeechToTextServiceError()
@@ -37,8 +37,3 @@ class AudioService:
buffer.name = 'temp.mp3'
return Whisper(provider_service.provider).transcribe(buffer)