Ë
    uPêj_  ã                   óx   — d Z ddlmZ ddlZddlmZ ddlmZ ddlm	Z	 ddl
mZ  G d„ d	e«      Z G d
„ de	«      Zy)z-
Transformation logic for Hosted VLLM rerank
é    )ÚFinalN©ÚAudioTranscriptionRequestData)ÚBaseLLMException)Ú%OpenAIWhisperAudioTranscriptionConfig)Ú	FileTypesc                   óP   ‡ — e Zd Z	 ddededeej                  z  dz  fˆ fd„Zˆ xZ	S )Ú!HostedVLLMAudioTranscriptionErrorNÚstatus_codeÚmessageÚheadersc                 ó*   •— t         ‰| �  |||¬«       y )N)r   r   r   )ÚsuperÚ__init__)Úselfr   r   r   Ú	__class__s       €ú{/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/llms/hosted_vllm/transcriptions/transformation.pyr   z*HostedVLLMAudioTranscriptionError.__init__   s   ø€ ô 	‰Ñ [¸'È7ÐÕSó    ©N)
Ú__name__Ú
__module__Ú__qualname__ÚintÚstrÚdictÚhttpxÚHeadersr   Ú__classcell__)r   s   @r   r
   r
      sA   ø„ ð
 04ñ	TàðTð ðTð ˜Ÿ™Ñ%¨Ñ,÷	Tñ Tr   r
   c                   ój   — e Zd Zdd„Z	 ddedz  dedz  dededed	edz  defd
„Zdedededede	f
d„Z
y)Ú"HostedVLLMAudioTranscriptionConfigÚreturnNc                  ó   — y r   © )r   s    r   r   z+HostedVLLMAudioTranscriptionConfig.__init__   s   € Ør   Úapi_baseÚapi_keyÚmodelÚoptional_paramsÚlitellm_paramsÚstreamc                 ón   — |r)|j                  d«      }|j                  d«      s|› d�}|S t        d«      ‚)Nú/z/v1/audio/transcriptionsz0api_base must be provided for Hosted VLLM rerank)ÚrstripÚendswithÚ
ValueError)r   r$   r%   r&   r'   r(   r)   s          r   Úget_complete_urlz3HostedVLLMAudioTranscriptionConfig.get_complete_url!   sB   € ñ à—‘ sÓ+ˆHØ×$Ñ$Ð%?Ô@Ø&˜ZÐ'?Ð@�ØˆOÜÐKÓLÐLr   Ú
audio_filec                 ó(   — ||dœ|¥}t        |¬«      S )z;
        Transform the audio transcription request
        )r&   Úfile)Údatar   )r   r&   r0   r'   r(   r3   s         r   Ú%transform_audio_transcription_requestzHHostedVLLMAudioTranscriptionConfig.transform_audio_transcription_request2   s#   € ð !&¨zÑM¸_ÐMˆä,Øô
ð 	
r   )r!   Nr   )r   r   r   r   r   r   Úboolr/   r   r   r4   r#   r   r   r    r       sž   „ óð #ñMà˜‘*ðMð �t‘ðMð ð	Mð
 ðMð ðMð �t‘ðMð 
óMð"
àð
ð ð
ð ð	
ð
 ð
ð 
'ô
r   r    )Ú__doc__Útypingr   r   Ú8litellm.llms.base_llm.audio_transcription.transformationr   Ú)litellm.llms.base_llm.chat.transformationr   Ú9litellm.llms.openai.transcriptions.whisper_transformationr   Úlitellm.types.utilsr   r
   r    r#   r   r   ú<module>r<      sC   ðñõ ã õõ Gõõ *ôTÐ(8ô Tô$
Ð)Nõ $
r   