Commit Graph

7 Commits

Author SHA1 Message Date
Matt Low cb9e27542e Add --system-prompt and --system-prompt-file flags
These allow to set a different system prompt for conversations and
one-shot prompts.

Also add a new `modelDefaults.systemPrompt` configuration key to define
the default system prompt, which can be overriden per-execution with the
--system-prompt or --system-prompt-file flags.
2023-11-22 04:45:06 +00:00
Matt Low 8780856854 Set config defaults using a "default" struct tag
Add new SetStructDefaults function to handle the "defaults" struct tag.

Only works on struct fields which are pointers (in order to be able to
distinguish between not set (nil) and zero values). So, the Config
struct has been updated to use pointer fields and we now need to
dereference those pointers to use them.
2023-11-19 04:37:14 +00:00
Matt Low b0a1299e0b Implement `lmcli ls` 2023-11-12 14:30:42 -07:00
Matt Low 1ac8f7d046 Trim content before returning InputFromEditor 2023-11-05 07:22:45 +00:00
Matt Low 6465ce5146 Trim placeholder from input via InputFromEditor 2023-11-04 22:52:48 +00:00
Matt Low 04478cbbd1 Refactor store and config handling
- Moved global `store` and `config` variables to cli.go
- Add Fatal() function for outputting an error and exiting
2023-11-04 14:22:16 -06:00
Matt Low 16454a0bbd Project restructure
Moved source files into cmd/ and pkg/ directories
2023-11-04 13:35:23 -06:00