Skip to content

Commit

Permalink
[DOC] Documentation for the two ChatGPT widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdapretnar committed Dec 15, 2023
1 parent 28b71bb commit 027136f
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 0 deletions.
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.

0 comments on commit 027136f

Please sign in to comment.