Hi @ferran, if you are comfortable setting environment variables and making an OpenAI account, you should be able to enable the formula assistant using these variables:
The formula assistant requires an LLM, and the easiest way to get it is via OpenAI’s services (or compatible services). I have personally experimented with running an LLM on my own machine, and it is possible but really bleeding edge messy stuff currently that I wouldn’t recommend.
Thanks Paul,
I did setup the OPENAI_API_KEY and I can see the AI Assistant option on the Web interface on the Cloud version, but not on the desktop Mac App. I did restart the Mac App after I set up the environment variable.
Hi @ferran, how confident are you the desktop app is seeing the environment variable? If you are setting the variable in a console, you’ll need to run the app from that console.
At least on Linux, with a command like OPENAI_API_KEY=boing ~/Downloads/grist-desktop-linux-0.2.10-x86_64.AppImage, I can see the assistant.
Hi @paul-grist - I’m not sure if this is a bug, or if the documentation needs clarification, but when I was attempting to get the AI assistant working on my self-hosted install, I was using the ASSISTANT_API_KEY environment variable with my OpenAI key, and the AI assistant was not showing up. However, when I used the OPENAI_API_KEY variable with the same key, then the AI assistant shows up.
This is confusing, since the docs say that that OPENAI_API_KEY is a synonym of ASSISTANT_API_KEY.
So if you are using ASSISTANT_API_KEY, is there some other addition environment var needed to indicate that they key is intended for use with OpenAI?
Thanks for reporting that @Travitron. It is confusing, those variables are intended to be synonyms, and I wouldn’t have expected one to work and not the other:
Ah, but now I see there is a piece of code that just checks the OPENAI one:
We’ll fix either the documentation or the behavior. Thanks for flagging this!