Skip to content
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

Provide documentation to set defaults #708

Open
igorgatis opened this issue Jan 18, 2025 · 2 comments
Open

Provide documentation to set defaults #708

igorgatis opened this issue Jan 18, 2025 · 2 comments

Comments

@igorgatis
Copy link

I struggled to find a way to setup defaults. I'd like to make responses shorter and wrap at 80 cols. I know that's possible with templates, I'm looking for a way to set the default template so I don't need to specify it every time.

It would be nice if there was documentation or even a bootstrap command to write initial config files so one can tweak the default behavior. I'd send a PR if I knew how to do it. :)

Example of other kinds of defaults people may want:

  • Provide context about the runtime environment: system: if the use input relates to computer program, remember you're running on OS foo and shell bar
  • Choose specific language: system: I speak English, Portuguese and Mandarin, pick the best option while replying
  • Enhance response: system: you may include ANSI sequences and emojis
@simonw
Copy link
Owner

simonw commented Jan 18, 2025

Oh interesting! So you're looking for a way to set a default system prompt that's used each time?

I'm worried about adding that to llm core because it might break its usage in other shell scripts - I have plenty of scripts on my own system that wrap llm and I wouldn't want those breaking because I set a new default system prompt and forgot it would affect them.

Instead, I suggest setting up your own alias. Here's an example for zsh (put this at the end of ~/.zshrc)

alias lm='function _lm() { llm -s "keep answers concise" "$@" }; _lm'

@igorgatis
Copy link
Author

That makes sense. I end up with:

llm --system 'keep answers concise, no markdown' --save concise

Then added alias lm='function _lm() { llm -t concise "$@" }; _lm'.

My point was about adding documentation about it. I guess I had .cursorrules in mind when spent time trying to find the same feature in llm. Perhaps this very issue suffices as doc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants