dave1010 / clipea

📎🟢 Like Clippy but for the CLI. A blazing fast AI helper for your command line
MIT License
299 stars 12 forks source link

Make system prompt customizable. #13

Closed b-boehne closed 8 months ago

b-boehne commented 8 months ago

I felt that clipea didn't respect my OS nearly enough (always recommended I use apt even though I am on Mac.
So I think making the system prompt customizable for everyone would be beneficial.

I'll probably submit a PR myself soon.

dave1010 commented 8 months ago

Thanks. Can you give any examples?

The OS gets provided as part of the environment that's sent to Clippy, so it should know what to use to install stuff. It might be that the prompt needs to be a bit more forceful there.

Having it fully customisable would be cool though. Maybe a ~/.clipea file.

b-boehne commented 8 months ago

I've had varying responses for these kind of prompts. e.g.

?? deinstall clipea from my system
📎🟢 $ pip uninstall clipea

or sudo apt-get remove clipea

they went away after editing the last line of system-prompt to this: Important: Every command you output will automatically be executed in this env, be careful to only output commands which will work on this operating system and shell:

But will still output apt-get stuff if my prompt is deinstall clipea from my ubuntu system which seems good.

EDIT: might also be beneficial to output the env stuff as text instead of json? or did you test this beforehand?