Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Notebook style with cells for execution of PaLM commands
Contributed by: Anton Antonov
Notebook style with cells for execution of PaLM commands based on the paclet "AntonAntonov/PaLMLink".
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["AntonAntonov/PaLMMode"]
To load the code after installation, evaluate this code:
Needs["AntonAntonov`PaLMMode`"]
Enable the current notebook to have PaLM interaction cells:
In[1]:= |
Another PaLMMode[] invocation converts the notebook into the default notebook style. More explicitly the styling can be specified with PaLMMode[True] or PaLMMode[False].
PaLMMode can also take notebook objects as arguments.
The text generation cell uses the evaluation function PaLMInputExecuteToText, which takes all options of AntonAntonov`PaLMLink`PaLMGenerateText. Desired option values can be set using SetOptions:
In[2]:= |
The message generation cell uses the evaluation function PaLMInputExecuteToChat, which takes all options of AntonAntonov`PaLM`PaLMGenerateMessage. Desired option values can be set using SetOptions:
The functions PaLMInputExecuteToText and PaLMInputExecuteToChat are simple wrappers of the function PaLMInputExecute.
The functions CellPrintWL and CellPrintAndRunWL of the paclet "AntonAntonov/NotebookModifiers" allow generated code to be printed and executed. Again, SetOptions used to change the epilog of the functions PaLMInputExecuteToChat or PaLMInputExecuteToText:
Here we get the notebook style provided by this paclet:
In[3]:= |
Out[3]= |
Here is a screenshot of a notebook with the notebook style PaLMMode applied: