Change argument processing to allow prompt or file args.#103
Merged
antimatter15 merged 3 commits intoantimatter15:masterfrom Mar 21, 2023
Merged
Change argument processing to allow prompt or file args.#103antimatter15 merged 3 commits intoantimatter15:masterfrom
antimatter15 merged 3 commits intoantimatter15:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_inpafter the instruction and prompt prefix.I also moved some default configuration settings into
utils.hto be consistent withllama.cpp.For example, you can run:
./chat -p "write a python script that prints the current time"orchat -f prompt.txtto make it print just the response to that prompt. Or:
./chat -p "write a python script that prints the current time" --interactiveTo respond to the first prompt and then continue interactively.
See issues 68 and 95.