Thank you for your interest in this paclet!
OpenAI completions are of two kinds: text completions and chat completions.
From my (recent) experiments, I know that text completions cannot be done with chat-models, and vice versa.
The problem you have -- with "OpenAILink" -- is that OpenAIMode`OpenAIInputExecuteToText
uses ChristopherWolfram`OpenAILink`OpenAITextComplete
.
In order to "fix" this in "OpenAILink" I can make OpenAIInputExecuteToText
take an evaluator function. (Which, by the way, the underlying function OpenAIInputExecute
does.) To a large extend I introduced that level of indirection to resolve these kind of problems.
I have to think about a proper design, though. OpenAIChatComplete
takes chat message objects, so, they have to be specified too.
Please see the attached notebook.
Thank you very much Anton. This is great!
I'm having a problem installing the paclet. After step 3:
PacletSymbol["ChristopherWolfram/OpenAILink",
"ChristopherWolfram`OpenAILink`$OpenAIKey"] = "KEY";
I get the following error: ""Tag PacletSymbol in \!(PacletSymbol[\"ChristopherWolfram/OpenAILink\
\", \"ChristopherWolframOpenAILink $OpenAIKey\"]) is Protected."
|
|
Thank you for the recognition, Moderation Team!
|
|
Do I need to give it my OpenAI API? If so, how?
|
|
Thank you for interest in this paclet!
Do I need to give it my OpenAI API?
I assume you mean your OpenAI API authorization token. Then the answer is yes. Generally, it is assumed that the installation and setup steps of "OpenAILink" have been completed. (Before using "OpenAIMode".)
If so, how?
Here is one way (to do the complete setup):
PacletInstall["ChristopherWolfram/OpenAILink"]
Needs["ChristopherWolfram`OpenAILink`"]
PacletSymbol[
"ChristopherWolfram/OpenAILink",
"ChristopherWolfram`OpenAILink`$OpenAIKey"] = "<YOUR API KEY>";
SystemCredential["OpenAIAPI"] = "<YOUR API KEY>";
PacletInstall["AntonAntonov/OpenAIMode"]
Needs["AntonAntonov`OpenAIMode`"]
|
|
I’ve tried this out in WolframCloud on my iPad and some of the featured described here do not work:
- Although
Shift-| b gives a text completion cell there is no cell icon to the left (I assume an issue with Stylesheets for cloud notebooks)
- Setting
OpenAIInputExecuteToImage does not generate images
ResourceFunction["MermaidJS"] is not on the WFR.
|
|
Thanks for trying this paclet out! I will respond to your observations list in the same order:
I have seen this "behavior" for some of my other "mode" notebook styles (on iPadOS.)
I can generate images with that cell on macOS.
I will have to experiment with it on iPadOS. (Later today, this week...)
ResourceFunction["MermaidJS"] uses Command Line Interface of Mermaid-JS (that has to be installed on the hosting OS.) Because of this I consider making a paclet for MermaidJS.
The Mermaid diagram spec (in the notebook) can be pasted in https://mermaid.live -- that will produce the corresponding image(s).
There is resource function submission "MermaidInk" that uses the online interface. (Much more lightweight than "MermaidJS".)
- For some reason(s) has not been published yet -- I will follow up on the status. (Again, later today, this week.)
- Here is resource object that can be used in the meantime: "MermaidInk".
ResourceFunction[
CloudObject[
"https://www.wolframcloud.com/obj/antononcube/DeployedResources/Function/MermaidInk"]]["
graph TD
WL --> |ZMQ|Python --> |ZMQ|WL
"]
|
|