Table of Contents

get () of ()

Description

The block makes a request to ChatGPT to get the synonyms or antonyms of the text specified in it. The response of ChatGPT is then stored in PictoBlox and can be accessed using the get AI response block.

Example

Example

Discover a unique experience in a Synonym/antonyms World, where the combined powers of Speech Recognition and ChatGPT Extension.

Introduction

Hey! Welcome to the fascinating realm of “Synonym/Antonym World,” where the powers of Speech Recognition and ChatGPT converge. Immerse yourself in an innovative platform that not only recognizes your speech but also provides an extensive collection of synonyms and antonyms for any given word. With this powerful combination, you can effortlessly expand your vocabulary, explore alternative expressions, and delve into the nuances of language. Unleash the potential of speech recognition and ChatGPT as you navigate through a world where words find their perfect counterparts. Get ready to unlock new dimensions of linguistic exploration in the captivating Synonym/Antonym World!

Code

Logic

  1. Open PictoBlox and create a new file.
  2. Choose a suitable coding environment for Block-based coding.
  3. We create an instance of the Speech recognition.This class allows us to convert spoken audio into text.
  4. Next, we create an instance of the ChatGPT model called gpt. ChatGPT is a language model that can generate human-like text responses based on the input it receives. 
  5. Recognize speech for 5 seconds using recognize speech for ()s in the () block.
  6. Save the recognized result in the “input” variable.
  7. Use the “get(synonyms) of ()” function to obtain synonyms of the recognized speech result.
  8. ChatGPT will provide the answers for 10 response synonyms in the “Synonym World” based on the given input.
  9. Use the “get(antonyms) of ()” function to obtain antonyms of the recognized speech result.
  10. The output of the anonymous word of the given input will be displayed by the sprite.
  11. Click on the green flag to run the code.

Output

Read More
All articles loaded
No more articles to load