File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ $ai= new OpenAIEndpoint('https://'.getenv('OPENAI_API_KEY').'@api.openai.com/v1'
116116$file= new File($argv[1]);
117117
118118$response= $ai->api('/audio/transcriptions')
119- ->open(['model', 'whisper-1'])
119+ ->open(['model' => 'whisper-1'])
120120 ->transfer('file', $file->in(), $file->filename)
121121 ->finish()
122122;
@@ -128,7 +128,7 @@ You can also stream uploads from *InputStream*s as follows:
128128``` php
129129// ...setup code from above...
130130
131- $upload= $ai->api('/audio/transcriptions')->open(['model', 'whisper-1']);
131+ $upload= $ai->api('/audio/transcriptions')->open(['model' => 'whisper-1']);
132132
133133$stream= $upload->stream('file', 'audio.mp3');
134134while ($in->available()) {
You can’t perform that action at this time.
0 commit comments