Closed dbarrosop closed 1 month ago
+1
what curl version are you using? there was an issue about curl 8.7 or sth similar afaik.
I had seen that, I just tried updating to 8.9.1
but no change. I had 8.1.2
before and the issue persisted.
Note I used to use my own simple llm plugin and use curl just fine in a very similar manner to this plugin, so I know with reasonable confidence it's not curl (version), unless there's specific piping going on that is obfuscated. Will dig further.
I am using curl 8.7.1 but in my case if I start nvim with sudo it works fine so I suspect it is a permissions issue. Is the history the only thing being written to disk? I can see the folder being created but no files written when running nvim
, with sudo nvim
I can see the history files being written.
I'm also seeing this issue. I'm using openai and have confirmed curling requests outside of neovim & avante work as expected. I tried updating curl as well and am still seeing the issue.
Seems related https://github.com/nvim-lua/plenary.nvim/issues/536
@dbarrosop from what I gather the command fails before even getting to the history save, so I don't think that's it. Permissions on the state
folder defined by storage_path
seem okay so I don't think it's a permission issue there.
It's the Llm.stream()
call that's failing, and falling back to on_error
- it would ideal to get a print out of the exact curl command so I could test/see what may be going on. I suspect it may be from trying to stream the curl response, which is perhaps piping data to another command this permission error.
Ok, I think I figured it out. So the issue is that the curl method is using $XDG_RUNTIME_DIR, which in my case was set to /run/user/501
which didn't exist. Just for the sake of trying I tried to set it to /tmp/run/user/501
but same issue. Finally, I created the folder with mkdir -p /tmp/run/user/501
and now everything works.
@dbarrosop yeah it seems plenary on MacOs, or some set of config, causes it to look there instead of the default /tmp
. This also works as a fix.
export XDG_RUNTIME_DIR="/tmp/"
Which you can set in your .zshrc
or something. I recommend doing this as folders in /tmp
are not guaranteed to be persistent.
This is most likely a plenary issue.
I ended up setting it to $TMPDIR
as I am using nix
and my $TMPDIR
is actually different from /tmp
.
In any case, maybe this can be closed.
Thanks a lot for the help and the plugin.
@dbarrosop yeah it seems plenary on MacOs, or some set of config, causes it to look there instead of the default
/tmp
. This also works as a fix.export XDG_RUNTIME_DIR="/tmp/"
Which you can set in your
.zshrc
or something. I recommend doing this as folders in/tmp
are not guaranteed to be persistent.This is most likely a plenary issue.
This worked for me as well.
I wil reference this into the wiki. will close it as it doesn't seem like it is related to the plugin.
Hello, I am trying this plugin which looks very promising but after setting it up I am getting the following error:
Looks like curl is trying to write something to disk and doesn't have permissions. I tried changing the setting
history.storage_path
but same issue. Do you know what this plugin is trying to write to disk, where and how to change it?In case it helps I am running this on MacOS and I installed neovim using
nix
and looks like using sudo works (which confirms it is a permission issue I guess).Thanks!