File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -324,12 +324,8 @@ fn encode_wav_normalized(audio: &RecordedAudio) -> Result<Vec<u8>, String> {
324
324
325
325
async fn resolve_auth ( ) -> Result < ( String , Option < String > ) , String > {
326
326
let codex_home = find_codex_home ( ) . map_err ( |e| format ! ( "failed to find codex home: {e}" ) ) ?;
327
- let auth_opt = CodexAuth :: from_codex_home (
328
- & codex_home,
329
- AuthMode :: ChatGPT ,
330
- codex_core:: default_client:: DEFAULT_ORIGINATOR ,
331
- )
332
- . map_err ( |e| format ! ( "failed to read auth.json: {e}" ) ) ?;
327
+ let auth_opt = CodexAuth :: from_codex_home ( & codex_home, AuthMode :: ChatGPT )
328
+ . map_err ( |e| format ! ( "failed to read auth.json: {e}" ) ) ?;
333
329
match auth_opt {
334
330
Some ( auth) => {
335
331
let token = auth
@@ -363,7 +359,7 @@ async fn transcribe_bytes(wav_bytes: Vec<u8>) -> Result<String, String> {
363
359
. post ( "https://api.openai.com/v1/audio/transcriptions" )
364
360
. bearer_auth ( bearer_token)
365
361
. multipart ( form)
366
- . header ( "User-Agent" , get_codex_user_agent ( None ) ) ;
362
+ . header ( "User-Agent" , get_codex_user_agent ( ) ) ;
367
363
368
364
if let Some ( acc) = chatgpt_account_id {
369
365
req = req. header ( "chatgpt-account-id" , acc) ;
You can’t perform that action at this time.
0 commit comments