Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
Fix example code snippets in Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
om4james committed Mar 2, 2023
1 parent 36f7925 commit 04df9fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ foreach ($response->data as $item) {
$openaiClient = \Tectalic\OpenAi\Manager::build(new \GuzzleHttp\Client(), new \Tectalic\OpenAi\Authentication(getenv('OPENAI_API_KEY')));

/** @var \Tectalic\OpenAi\Models\AudioTranscriptions\CreateResponse $response */
$response = $openaiClient->imagesGenerations()->create(
$response = $openaiClient->audioTranscriptions()->create(
new \Tectalic\OpenAi\Models\AudioTranscriptions\CreateRequest([
'file' => '/full/path/to/audio/file.mp3',
'model' => 'whisper-1',
Expand All @@ -121,7 +121,7 @@ echo $response->text;
$openaiClient = \Tectalic\OpenAi\Manager::build(new \GuzzleHttp\Client(), new \Tectalic\OpenAi\Authentication(getenv('OPENAI_API_KEY')));

/** @var \Tectalic\OpenAi\Models\AudioTranslations\CreateResponse $response */
$response = $openaiClient->imagesGenerations()->create(
$response = $openaiClient->audioTranslations()->create(
new \Tectalic\OpenAi\Models\AudioTranslations\CreateRequest([
'file' => '/full/path/to/audio/file.mp3',
'model' => 'whisper-1',
Expand Down

0 comments on commit 04df9fb

Please sign in to comment.