Commit Graph

14 Commits

Author SHA1 Message Date
239ded18f3 Add edit command
Various refactoring:
- reduced repetition with conversation message handling
- made some functions internal
2024-01-02 04:31:21 +00:00
4f37ed046b Delete 'retried' messages in lmcli retry 2023-11-29 04:50:45 +00:00
ed6ee9bea9 Add *Message[] parameter to CreateChatCompletion methods
Allows replies (tool calls, user-facing messges) to be added in sequence
as CreateChatCompleion* recurses into itself.

Cleaned up cmd.go: no longer need to create a Message based on the
string content response.
2023-11-29 04:43:53 +00:00
e850c340b7 Add initial support for tool/function calling
Adds the following tools:
- read_dir - list a directory's contents
- read_file - read the content of a file
- write_file - write contents to a file
- insert_file_lines - insert lines in a file
- replace_file_lines - replace or remove lines in a file
2023-11-27 05:26:20 +00:00
db27a22347 Removed 'get' prefix from DataDir() and ConfigDir() 2023-11-22 03:17:13 +00:00
6af9377cf5 Implement lmcli rm 2023-11-13 06:56:05 +00:00
b0e4739f4f Fixed lmcli view completions
- Don't return completions if an arg is already present
- Fixed typo in method name
2023-11-13 05:27:21 +00:00
4e3976fc73 Remove Get prefix from Store methods
It feels better this way (and to the rest of Go, apparently)
2023-11-13 00:20:54 +00:00
b87c3ffc53 Implement lmcli view [conversation] with completions
Separate out logic to retrieve a message's "friendly" role (System,
User, Assistant)
2023-11-12 23:33:16 +00:00
b0a1299e0b Implement lmcli ls 2023-11-12 14:30:42 -07:00
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
200ec57f29 Run gofmt/goimports on go sources 2023-11-04 22:56:31 +00:00
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
16454a0bbd Project restructure
Moved source files into cmd/ and pkg/ directories
2023-11-04 13:35:23 -06:00