Matt Low
239ded18f3
Add edit command
...
Various refactoring:
- reduced repetition with conversation message handling
- made some functions internal
2024-01-02 04:31:21 +00:00
Matt Low
5615051637
Improve config handling
...
- Backup existing config if we're saving it to add configuration
defaults
- Output messages when saving/backing up the configuration file
2023-11-29 05:54:05 +00:00
Matt Low
d32e9421fe
Add openai.enabledTools config key
...
By default none are, they must be explicitly enabled by the user adding
the configuration.
2023-11-29 05:27:58 +00:00
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
db27a22347
Removed 'get' prefix from DataDir() and ConfigDir()
2023-11-22 03:17:13 +00:00
Matt Low
e6dcefacf5
Add syntax highlighting
2023-11-19 05:00:59 +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
8bc8312154
Add --length flag to control model output "maxTokens"
2023-11-18 16:17:13 +00:00
Matt Low
ae424530f9
Parameterize the openai model used
...
Add `openai.defaultConfig` to set the default, will allow overriding
with CLI flag
2023-11-09 06:07:52 +00:00
Matt Low
9c9b8fa412
Refactor Store/Config initialization
...
Renamed initialize functions from `Initialize*` to `New*`, return an
error from them instead of using Fatal.
2023-11-05 17:44:16 +00:00
Matt Low
b46bbef80b
Spelling
2023-11-05 06:51:56 +00:00
Matt Low
200ec57f29
Run gofmt/goimports on go sources
2023-11-04 22:56:31 +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