-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs:OpenAIMode demo presentation slides.
- Loading branch information
1 parent
e832399
commit 75d3b17
Showing
5 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
|
||
# OpenAIMode demo | ||
|
||
**...for Mathematica notebooks** | ||
|
||
**Anton Antonov | ||
[MathematicaForPrediction at WordPress](https://mathematicaforprediction.wordpress.com) | ||
[MathematicaForPrediction at GitHub](https://github.com/antononcube/MathematicaForPrediction) | ||
April 2023** | ||
|
||
***[Video recording](https://youtu.be/htUIOqcS9uA)*** | ||
|
||
--- | ||
|
||
## Setup | ||
|
||
- It is assumed that the paclet [OpenAILink](https://resources.wolframcloud.com/PacletRepository/resources/ChristopherWolfram/OpenAILink/) is installed | ||
|
||
- ... and the required setup steps are completed. | ||
|
||
- Install the paclet [OpenAIMode](https://resources.wolframcloud.com/PacletRepository/resources/AntonAntonov/OpenAIMode/) | ||
|
||
```mathematica | ||
PacletInstall["AntonAntonov/OpenAIMode"] | ||
``` | ||
|
||
![11og8fps5xhgk](./Diagrams/OpenAIMode-demo/11og8fps5xhgk.png) | ||
|
||
```mathematica | ||
Needs["AntonAntonov`OpenAIMode`"] | ||
``` | ||
|
||
--- | ||
|
||
## Demo | ||
|
||
Let us show how the notebook style works: | ||
|
||
- Needs | ||
|
||
- OpenAIMode | ||
|
||
- Text completion cell (shortcut: "Shift-|") | ||
|
||
- Tweak invocation parameters with SetOptions | ||
|
||
- Image generation cell (shortcuts: "Tab") | ||
|
||
### Screenshots | ||
|
||
![06wybw0d8ntd6](./Diagrams/OpenAIMode-demo/06wybw0d8ntd6.png) | ||
|
||
![1iqsuwy5jkmit](./Diagrams/OpenAIMode-demo/1iqsuwy5jkmit.png) | ||
|
||
--- | ||
|
||
## How does it work? | ||
|
||
Consider the following flowchart: | ||
|
||
```mathematica | ||
ResourceFunction["MermaidJS"]["flowchart TDOpenAI{{OpenAI}}OpenAILink[[\"OpenAILink\"]]TCC[\"Text completion cell\"]IGC[\"Image generation cell\"] OC[\"Output cell\"]UI[/\"User input\"/]UI --> TCCUI --> IGCTCC -.-> OpenAIInputExecuteToText -.-> OpenAILinkIGC -.-> OpenAIInputExecuteToImage -.-> OpenAILinkOpenAILink <-.-> OpenAIOpenAILink -.-> OCTCC --> OCIGC --> OCsubgraph NotebookTCC OpenAIInputExecuteToTextIGC OpenAIInputExecuteToImageOCend ", "PDF", ImageSize -> 1000] | ||
``` | ||
|
||
![0wyc32bgh7gso](./Diagrams/OpenAIMode-demo/0wyc32bgh7gso.png) | ||
|
||
--- | ||
|
||
## Concluding remarks | ||
|
||
### Similar work | ||
|
||
- DSLMode and [RakuMode](https://community.wolfram.com/groups/-/m/t/2434981) | ||
|
||
- [DarkMode](https://resources.wolframcloud.com/FunctionRepository/resources/DarkMode/) and [DraculaTheme](https://resources.wolframcloud.com/FunctionRepository/resources/DraculaTheme/) | ||
|
||
### Future plans (...maybe) | ||
|
||
More documentation | ||
|
||
Should this notebook style functions be part of [OpenAILink](https://resources.wolframcloud.com/PacletRepository/resources/ChristopherWolfram/OpenAILink/)? | ||
|
||
Based on feedback: | ||
|
||
- Better default options | ||
|
||
- Additional OpenAI cells |