Change argument processing to allow prompt or file args. #103
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.
To implement this, I first changed how the prompt and file args are processed, so that they turn off the default interactive mode and color. Then I added the provided prompt into
embd_inp
after the instruction and prompt prefix.I also moved some default configuration settings into
utils.h
to be consistent withllama.cpp
.For example, you can run:
./chat -p "write a python script that prints the current time"
orchat -f prompt.txt
to make it print just the response to that prompt. Or:
./chat -p "write a python script that prints the current time" --interactive
To respond to the first prompt and then continue interactively.
See issues 68 and 95.