Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Documentation for the two ChatGPT widgets #269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions doc/widgets/chatgpt-constructor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
ChatGPT Constructor
===================

Construct a text field using a ChatGPT.

**Inputs**

- Data: data used for prompt to ChatGPT.

**Outputs**

- Data: data, generated by ChatGPT.

**ChatGPT Constructor** enables creating new variables with the ChatGPT API.

![](images/ChatGPT-Constructor.png)

- Model:
- API Key: personal ChatGPT API key. Required for the widget to run.
- Model: ChatGPT model. Current options: gpt-3.5-turbo and gpt-4.
- Data:
- Text variable: variable used in the ChatGPT prompt.
- Prompt:
- Start: Prompt before the variable text.
- End: Prompt after the variable text.

Example
-------

Here, we construct a simple data set. We are using the *English Words* dataset, a list of 150 English words. We pass this to the **ChatGPT Constructor** widget, which takes the words as input. In the prompt, we ask ChatGPT to generate a short sentence with each word. On the output, we have a [Data Table](https://orangedatamining.com/widget-catalog/data/datatable/), which shows a new column called *Text* containing the generated sentences.

![](images/ChatGPT-Constructor-Example.png)
30 changes: 30 additions & 0 deletions doc/widgets/chatgpt-summarize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
ChatGPT Summarize
=================

Summarize content using a ChatGPT.

**Inputs**

- Data: data used for summarization.

**ChatGPT Summarize** enables summarizing and exploring a given variable with the ChatGPT API.

![](images/ChatGPT-Summarize.png)

- Model:
- API Key: personal ChatGPT API key. Required for the widget to run.
- Model: ChatGPT model. Current options: gpt-3.5-turbo and gpt-4.
- Data:
- Text variable: variable used in the ChatGPT prompt.
- Prompt:
- Start: Prompt before the variable text.
- End: Prompt after the variable text.

Example
-------

Here, we explore the *zoo* dataset. We pass this to the **ChatGPT Summarize** widget, which takes the animal names as input. In the prompt, we ask ChatGPT to find all the animals that can be found in Europe. The widget displays the answer on the right.

![](images/ChatGPT-Summarize-Example.png)

Please note that this widget is not appropriate for summarizing corpora as it joins variable values and cuts them at certain length (limitation of ChatGPT API).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/widgets/images/ChatGPT-Constructor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/widgets/images/ChatGPT-Summarize-Example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/widgets/images/ChatGPT-Summarize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading