OPENAI enhanced prompts tool
Project description
GPT Engine
GPT Engine is a Python module that allows you to interact with the OpenAI API to generate text. It can be used for a variety of tasks, such as generating creative text formats, like poems, code, scripts, musical pieces, email, letters, etc., or answering your questions in an informative way.
To use GPT Engine, you will need to create a free account with OpenAI and get an API key. You can then install the GPT Engine module using pip:
pip install gptEngine Once you have installed the module, you can create a GPT Engine object:
engine = GPTEngine(main_task="Generate Text", input_prompt="Write a poem about love.") The main_task parameter specifies the type of task that you want to perform, and the input_prompt parameter specifies the input text that you want to provide to OpenAI.
To generate text, you can call the generate_response() method:
response = engine.generate_response("test.docx") The generate_response() method takes the path to a .doc file as input. The text content of the file will be processed by OpenAI and a response will be generated.
The response from OpenAI will be returned as a string. You can then use the response as needed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gptEngine-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e8d8c5f971faf5c5167217937a0a92c38dc4bb42e186ca70472e5f31d847c33 |
|
MD5 | 093574aa36ed59f4f5390e98efac535c |
|
BLAKE2b-256 | 16c36eb1a2de914b20abe1fed7016ceb9ac1ccb05164859b650d1c3a9aed4a70 |