From ef0270295e33d68ed1779dc04e244b8d24bd4f22 Mon Sep 17 00:00:00 2001 From: Ashley Johnson <61059402+PapaRascal2020@users.noreply.github.com> Date: Sat, 21 Sep 2024 16:30:49 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a76c3ce..ee2d5f7 100644 --- a/README.md +++ b/README.md @@ -278,7 +278,7 @@ return $sidekick->transcribe()->audioFile( filePath: 'http://english.voiceoversamples.com/ENG_UK_M_PeterB.mp3' ); ``` -#### Example Response +** Example Response ** ```json { "text":"The stale smell of old beer lingers. It takes heat to bring out the odor. A cold dip restores health and zest. A salt pickle tastes fine with ham. Tacos al pastor are my favorite. A zestful food is the hot cross bun." @@ -297,7 +297,7 @@ return $sidekick->moderate()->text( content: 'Have a great day.', ); ``` -#### Example Response +** Example Response ** ```json { @@ -336,6 +336,32 @@ return $sidekick->moderate()->text( ]} ``` +#### Utilities + +Utilities are quick ways of performing some actions using AI. The functions and there descriptions are below: + +```PHP +// Summarises the content passed. Good for blurbs +$sidekick->utilities()->summarise() + + +// Extracts a number of keywords from a given string and returns a string of keywords (comma separated) +$sidekick->utilities()->extractKeywords() + +// Translates the given text to the language specified +$sidekick->utilities()->translateText() + +// Generates content from a short description of what it should be about +$sidekick->utilities()->generateContent() + +// [OpenAI ONLY] Moderates content and returns a boolean of whether the content is flagged or not +$sidekick->utilities()->isContentFlagged() + +// [OpenAI ONLY] this method can store images and audio created by the AI. +$sidekick->utilities()->store() +``` + + ### Ways to Contribute I want this composer package for Laravel to be as useful as possible, so with that in mind here are the ways you can contribute: From c5c6fe0ac0b07921dec2e09cc60c6d35e839aa3c Mon Sep 17 00:00:00 2001 From: Ashley Johnson <61059402+PapaRascal2020@users.noreply.github.com> Date: Sat, 21 Sep 2024 16:31:45 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ee2d5f7..9b30221 100644 --- a/README.md +++ b/README.md @@ -342,23 +342,23 @@ Utilities are quick ways of performing some actions using AI. The functions and ```PHP // Summarises the content passed. Good for blurbs -$sidekick->utilities()->summarise() +$sidekick->utilities()->summarise(); // Extracts a number of keywords from a given string and returns a string of keywords (comma separated) -$sidekick->utilities()->extractKeywords() +$sidekick->utilities()->extractKeywords(); // Translates the given text to the language specified -$sidekick->utilities()->translateText() +$sidekick->utilities()->translateText(); // Generates content from a short description of what it should be about -$sidekick->utilities()->generateContent() +$sidekick->utilities()->generateContent(); // [OpenAI ONLY] Moderates content and returns a boolean of whether the content is flagged or not -$sidekick->utilities()->isContentFlagged() +$sidekick->utilities()->isContentFlagged(); // [OpenAI ONLY] this method can store images and audio created by the AI. -$sidekick->utilities()->store() +$sidekick->utilities()->store(); ```