-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trailing characters #24
Comments
Hmm strange, running this exact command on the following neovim version seems to work for me:
|
Hi @terror, As it turns out @terror, this seems to work (still working out somethings, might be useful to add to your documentation for all the folks using Lazy instead of Packer.) Since I already have @jackMort's {
"jackMort/ChatGPT.nvim",
event = "VeryLazy",
config = function()
require("chatgpt").setup()
end
},
{
"terror/chatgpt.nvim",
event = "VeryLazy",
config = function()
require("chatgpt").setup()
run = "pip3 install -r requirements.txt"
end
}
} Here's a screenshot of So in every sense when I run Cheers, |
Thanks for the kind words, It's worth noting - I'm running this instance of AstoNVim on Docker. I spun it up via: docker run -it alpine:edge
apk add git curl NeoVim
git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim
nvim
nvim ~/.config/lua/user/plugins/core.lua
git clone https://github.com/AstroNvim/user_example ~/.config/nvim/lua/user
nvim ~/.config/lua/user/plugins/core.lua
git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim
git clone https://github.com/AstroNvim/user_example ~/.config/nvim/lua/user
nvim ~/.config/nvim/lua/user/plugins/core.lua
soure .bashrc
echo $OPENAI_API_KEY
nvim .bashrc
source .bashrc
nvim Then to the rest of the configuration; e.g. (Editing the As far as the API key goes, I've fixed the JSON to double quotes, it now looks like this: { "api_key": "<API-KEY>" } In the CONFIG_PATH = '~/.chatgpt-nvim.json'
DEFAULT_CONFIG = { 'authorization:' '', 'session_token': 'My OpenAI API Token'} I installed the dependencies from the pip3 install -r requirements.txt -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com I also checked by running regular Cheers, |
Hi @Montana I too am getting the "E488 Trailing Characters" issue, the issue for me is i'm not sure how to edit the python file. there's not that much documentation. the video showed was only about 30 seconds and it looked like author had it already installed but I am getting "E488 Trailing Characters" . I even tried doing in nvim hopefully we can get this resolved! it's such a cool function. -Otto |
Hi @EvilOtto2, There is a question, on some imports in this Python file, that don't exist in the Python file in the really cool video @terror posted. I'll attach screenshot. In particular I've debugged a little, the only thing I can think of is since @jackMort's plugin is called Theoretically it could be just a weird setting in Cheers, |
It seems like you're running an outdated version of the plugin, I'd try either updating or re-installing the plugin entirely -- I've since switched to using the official OpenAI python bindings instead of the reverse-engineered one. Let me know if this works! |
Hi @terror, To confirm, is the one you show in asciinema the current In the asciinema video, these don't exist. Just wondering, and if so is there any way I could see that configuration instead of the ones pushed up (that is if that's the most current build.) I'd assume since the video was made four months ago, the current build that's in the repo is the most recent, just confused about the I guess my final question is, in these variables: CONFIG_PATH = '~/.chatgpt-nvim.json'
DEFAULT_CONFIG = { 'authorization:' '', 'session_token': 'My OpenAI API Token'} I understand that Thanks again @terror. |
Hey everyone, I've finally got it working, the issue is things like NeoVim, AstroNVim, LunarVim, I could go on are moving away from Packer. I've yet to find a good way to install this through Lazy, which seems to be the new package standard for these templated NeoVim variants and not Packer. So the current fix is to pull an old version of NeoVim off a older tree, for example: git clone https://github.com/neovim/neovim/tree/v0.8.0 Then try installing this plugin. For example, once I was using Packer and not Lazy: Query: Response: Cheers, |
Hi everyone,
When I try and run the following:
ChatGPT test
I get the following error:
Trailing characters: test
I've attached a screenshot.
I've followed some feasible solutions @terror, but none of them seem to work.
The text was updated successfully, but these errors were encountered: