User talk:Reyhane
I'm sorry Reyhane,
I can´t get it to produce output. I have the extension installed. I have the openai, python installed. I can communicate from the terminal with openai. I see my first API connection made in Chatgpt backend from the terminal.
Pascal.
- Hello Pascal,
- The problem may be that the environment variable
OPENAI_API_KEY
is not set correctly, or is not readable inside LibreOffice. To test it, please run this BASIC code in LibreOffice BASIC IDE. Go through these menus: - "Tools > Macros > Organize Macros > BAISC", and then choose "Edit".
Sub Main MsgBox "Your API key: " + Environ("OPENAI_API_KEY") End Sub
- The output should be your API key. Sometimes, if you or on Linux and you use
~/.bashrc
, you need to run LibreOffice from command line, likelibreoffice7.6
to see that the environment variable works correctly. - I hope that this solution fixes the problem. If not, please provide more details.
- --Reyhane (talk) 23:53, 13 December 2023 (UTC)
Using the AI assistant
I have installed the extension successfully. I have the AI assistant in the menu bar. And I'm looking forward to using it without resorting to ChatGPT followed by copy/paste. My OpenAI API key is in the system variables, I defined it and I was able to control this with the script you defined in the previous message. I am looking for a way to define my own prompts, but I can't find it. I can't imagine this extension is limited to the few predefined prompts. So I need your help to find what I'm looking for.
Thanks in advance
Kind regards,
Jean-Pierre Kent
Sworn interpreter and translator (Dutch, French, Romanian)
Member of the Netherlands Order of Registered Interpreters and Translators (ORT&V)
- Hello Jean-Pierre,
- Thank you for installing and using the extension! This is only the first version of the software, and it can not store values to use permanently. Therefore, it is not possible to have such a feature right now.
- I am working on future version of the code that solves this problem, so that the installation becomes easier, and also let people use custom prompts. I hope that I can make this happen sooner, but I do not have any estimate for the needed time.
- Meanwhile, you can change the "main.py", the Python script that is inside the package -which is actually a zip file with .oxt extension-, and change the previously defined prompts. This needs Python programming knowledge.
- --Reyhane (talk) 21:17, 27 February 2024 (UTC)
I too am having the no output issue. The MsgBox responds with the correct key. platform.openai.com/api-keys indicates the key has never been used.