-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to support context #9
Comments
Hi @IamJasonBoy, You can use -p flag along with cat command to provide the context. So from your example above, it will look like as follows: You can check for more such options and examples in the Readme under "Bito CLI commands" section here: https://github.com/gitbito/CLI#bito-cli-commands |
I don't quite understand, if I ask a question once. When asked the second time. The text for the second question is stored in bito.txt. How to store the first question
bito.txt -> Save this text |
@IamJasonBoy if I understood correctly you want to save multiple questions or have multiple prompts? |
It's contextual communication, and my second question relies on the first one. |
Hi @IamJasonBoy , Currently Bito CLI does not support context out of the box, except for in chat mode. When used in non chat mode with -p option, each call uses the prompt plus the input provided for evaluating instructions in the prompt file. We are working on supporting context, but it's not available today. We will update you once the functionality is available. |
Hi @IamJasonBoy , Till we have the context support implemented natively for non chat mode and make it available, one can write a shell script which maintains context and uses Bito CLI with it. Given below is an example shell script
Given below is an example run:
Given below are the prompt files use in the above example run:
Given below is the content of the context file
With a multiline file as input:
Here's the output of the shell script
Hope this helps |
Thank you for your answer, although I didn't understand |
他的意思应该是将每次的回答前面加上"Bito CLI:",添加到context文件的末尾,作为下一次询问的context. |
@IamJasonBoy , |
Hello @IamJasonBoy You can now use -c flag along with cat, -p and -f flags to provide context in the non-interactive mode. You just need to provide some filename to -c flag as an argument and keep using that same filename for -c for all your further requests to Bito. Here is how you can do it:
I am also attaching a screenshot that shows the above examples in action: Let us know if you face any issues. Thanks! |
@IamJasonBoy also, do let us know if this solves your problem and if we can close this issue. |
How to support context and what is the format of file content when I use this method
The text was updated successfully, but these errors were encountered: