feat: claude api support (#572)

This commit is contained in:
John Wang 2023-07-17 00:14:19 +08:00 • committed by GitHub
commit 7599f79a17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)