This is basic example of using Open AI APIs to translate the text submit into a language using prompt.
The solution is based on Flask and Jquery.
To run the application, follow the steps below
-
Clone the repository.
-
Create and add the private key created on OpenAI https://platform.openai.com/account/api-keys to the .env file.
-
Run command -> pip install -r requirements.txt
-
Run command -> flask run
This opens up an app with a textbox where you can enter text and press Enter key. On pressing enter, jquery sends a request to the API which in turn call open ai API and returns a response.