Closed JoseConseco closed 8 months ago
just to be clear both actions:
The are basicallly same, only template is different. Thus I think its bug in ogpt.
how did you set your actions in your neovim config? did you use the action_paths
where it takes json files, or did you directly added to the actions
portion of your config?
Most likely, you are using the action_paths
since the screenshot looks like they are from a json file. If you use the json files to set your actions, these actions are loaded, and then GETS OVERLOADED by the actions that are in your default configuration table that you initialize OGPT with.
so "edit_code_with_instructions" that you provide in your json action file, gets override by this [default "edit_code_with_instructions" action] (https://github.com/huynle/ogpt.nvim/blob/277bcccfbcb7f896d43de698609266845458e196/lua/ogpt/config.lua#L209C1-L221C9) in this [line] (https://github.com/huynle/ogpt.nvim/blob/277bcccfbcb7f896d43de698609266845458e196/lua/ogpt/flows/actions/init.lua#L48)
ah, ok I see - the readme links to this 'shorter' config But your link - is slightly different (100 more lines) and indeed contains actions with "edit_code_with_instructions"
So even if I have no actions defined, they are loaded from default config, and 'actions_path' wont override it.
May I suggest that depending on the order of defined actions, next one should override previous one?
default_actions = {..} - we should be able to override it from user config
Then user config:
actions = {..}
actions_path = {..} - last one overrides the previous ones.
But if users chagnes order of last two
actions_path = {..}
actions = {..} - now this will override both default actions and actions_path (and defaults) .
i think your issue should be solved with this MR - https://github.com/huynle/ogpt.nvim/pull/14
well, right now ollama wont even start (tried to enable debug, but I got no errors). I updated my config with: maybe it is wrong?
hrm , try it without the ending "/" in your api_host
Ok, this worked. Now the OGPT is complaining about model not being there - but I think the issue is with parsing its name the part after -
seems ingnored:
youre original model name, should still work with this new update. did you get it to work?
Yes, the chat worked when using :OGPT . It is only when I use OGPTRun - it is complaining about wrong model .
:OGPT - ok
:OGPTRun - wont parse model correctly (I think) . Config:
I have no idea which config is executed now - default, my_config.actions, or actions.json.
In my actions I have overriden "optimize_code" ( to make it clear in template I told it to upperacase var names). It worked ok. Now same thing with "edit_code_with_instructions" would not work. - as u can see below ogpt is complaining about wrong model (even though I overrode it to deepseek, and in prompt I told it to uppercase var names too )
Now if I change tamplate name to
edit_code_with_instructions**_mine**
, then it works ok. Looks like some templates cant be overridden correctly.