obsidian-excalidraw-plugin
obsidian-excalidraw-plugin copied to clipboard
FR: Adding an option for ExcaliAI to choose a system prompt that has the context of the script engine.
Is your feature request related to a problem? Please describe. This is a feature request unrelated to a problem. I think others could find this useful.
I am doing some experimenting with creating scripts with the script engine. To help me create scripts, I used the openai api playground to create an agent that has knowledge of your scripting engine. This just means I provided a system prompt with relevant information about the scripting engine. I provided the entire definition of the ExcalidrawAutomate class, an example script (slideshow script), and your description of script development from the docs.
I have been seeing positive results with this. I am currently developing a script that can do animations in obsidian-excalidraw.
Describe the solution you'd like The solution would be pretty simple since you already have an interface to the OpenAI. You do something similar in this youtube video All you would have to do is provide the system prompt.
You may want to set it as a system prompt when you make the api call. If you provide it as a normal prompt I believe the AI will be less likely to follow those instructions. It might be useful to allow users to define some api parameters as well, such as the temperature or the maximum tokens. I also heavily advise to set the default model as gpt-4o-mini since it is the one of the cheapest and most performant model
Here is the system prompt I am using. There are probably more optimization you could do for it.
Best,
Logan Lang