xi2pi / multipromptapi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MultiPromptAPI

MultiPromptAPI is a graphical user interface designed to streamline the process of working with multiple prompts using OpenAI's text-davinci-003 model and the OpenAI API. This tool offers a simple and user-friendly interface, allowing users to easily interact with the OpenAI API and execute a wide range of natural language processing tasks. With MultiPromptAPI, users can quickly and efficiently generate text, answer questions, and perform other tasks, all from a single, unified interface.

In addition to its graphical user interface, MultiPromptAPI also offers a convenient feature for exporting the output generated by the OpenAI model. Upon executing a prompt, MultiPromptAPI automatically generates a Microsoft Word document containing the text generated by the model. This makes it easy for users to save and share their results, as well as incorporate the generated text into other documents or presentations. The exported document can be customized with different font styles, sizes, and colors to match the user's preferred visual style.

multipromptapi

How to use it

OpenAPI key

First, you need to generate a key for the OpenAI API. To generate a key, follow these steps:

  1. Go to the OpenAI website: Visit the OpenAI website (https://beta.openai.com/) and create an account, if you haven't already.
  2. Access the API Key Management page: Once you have an account, log in and go to the API Key Management page, which can be found in the Developer Dashboard.
  3. Generate a new API Key: On the API Key Management page, click the "Generate" button to generate a new API key.
  4. Store your API Key securely: The generated API key will be displayed on the screen. Make sure to store it securely, as this key will be required to access the OpenAI API.

Next step, you need to add the API key to the file "textgen_engine.py". Find and change the line:

openai.api_key = "enter your key here"

Run the application

panel serve MultiPromptAPI.ipynb --autoreload

When you run this command in the terminal or command prompt, it will start the Panel server, convert the Jupyter Notebook into a web application, and serve it at a specified URL.

You can then access the web application in your web browser: http://localhost:5006/MultiPromptAPI

Dependencies

To use this application, make sure that you installed following python packages:

  • Panel
  • Jupyter Notebook
  • pandas
  • docxtpl
  • openai

About

License:MIT License


Languages

Language:Jupyter Notebook 100.0%Language:Python 0.0%