fix: support piping stdin into gptme -r (resume) #344
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Almost got it to do this autonomously, but I still had to do some cleanup :P
I added the
msg.role == "user"
checks because those functions contain asserts that the role should be user.Fixes #202
Important
Add support for piping stdin into
gptme -r
(resume) by appending piped input to prompt messages incli.py
.gptme -r
(resume) incli.py
.prompt_msgs
if resuming a conversation inmain()
.main()
incli.py
to handle piped input and append toinitial_msgs
for new conversations.confirm_func()
andexecute_cmd()
logic inchat.py
to handle user role checks.cli.py
to use_read_stdin()
function.This description was created by for a69c42e. It will automatically update as commits are pushed.