File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
dashscope/audio/qwen_omni Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ def __init__(
9595 headers = None ,
9696 workspace = None ,
9797 url = None ,
98+ api_key : str = None ,
9899 additional_params = None ,
99100 ):
100101 """
@@ -124,7 +125,7 @@ def __init__(
124125 else :
125126 url = f'{ url } ?model={ model } '
126127 self .url = url
127- self .apikey = dashscope .api_key
128+ self .apikey = api_key or dashscope .api_key
128129 self .user_headers = headers
129130 self .user_workspace = workspace
130131 self .model = model
@@ -277,7 +278,8 @@ def update_session(self,
277278 }
278279 if transcription_params is not None :
279280 self .config ['input_audio_transcription' ] = {}
280- self .config ['input_audio_transcription' ].update ({'language' : transcription_params .language })
281+ if transcription_params .language is not None :
282+ self .config ['input_audio_transcription' ].update ({'language' : transcription_params .language })
281283 if transcription_params .corpus_text is not None :
282284 transcription_params .corpus = {
283285 "text" : transcription_params .corpus_text
You can’t perform that action at this time.
0 commit comments