Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Notebook style with cells for execution of OpenAI commands
Contributed by: Anton Antonov
Notebook style with cells for execution of OpenAI commands based on the paclet OpenAILink.
To install this paclet in your Wolfram Language environment,
evaluate this code:
To load the code after installation, evaluate this code:
Enable the current notebook to have OpenAI interaction cells:
OpenAIMode can also take notebook objects as arguments.
The text completion cell uses the evaluation function OpenAIInputExecuteToText. which takes all options of ChristopherWolfram`OpenAILink`OpenAITextComplete. Desired option values can be set using SetOptions:
The text completion cell uses the evaluation function OpenAIInputExecuteToImage. which takes all options of ChristopherWolfram`OpenAILink`OpenAICreateImage. Desired option values can be set using SetOptions:
The function OpenAIMode takes the options "TokenLimit" and ImageSize the values of which are used to do default options settings for OpenAIInputExecuteToText and OpenAIInputExecuteToImage respectively. For example, the command:
is equivalent to the sequence of commands:
The functions OpenAIInputExecuteToText and OpenAIInputExecuteToImage are just simple wrappers of the function OpenAIInputExecute.
The paclet provides the functions CellPrintWL and CellPrintAndRunWL that allow generated code to be printed and executed. Again, SetOptions used to change the epilog of the function OpenAIInputExecute:
Here we get the notebook style provided by this paclet:
Here is a screenshot of a notebook with the notebook style OpenAIMode applied:
Wolfram Language Version 13.2