-
Notifications
You must be signed in to change notification settings - Fork 321
Add Flags That Enable Better Compatibility With Scripts #13
Conversation
I wonder if we need two different flags? It sounds confusing for the sample to listen for a new query if Would adding |
You're right, changing the default of Would you like me to remove the |
I believe the first conversation always need a trigger with the current code. |
I misread your previous message and thought you meant change the value of Take a look at the latest commit, it has only the |
googlesamples/assistant/__main__.py
Outdated
@@ -214,11 +214,13 @@ def gen_converse_requests(self): | |||
@click.option('--grpc-channel-option', multiple=True, nargs=2, | |||
metavar='<option> <value>', | |||
help='Options used to construct gRPC channel') | |||
@click.option('--once', default=False, is_flag=True, | |||
help='Force termination after a single response.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/response/conversation/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a nit.
Additionally, don't wait for a user trigger if the 'once' flag is passed.
Fixed. |
I dont recommend using it without trigger because I ended up using my daily tokens within 1 hour |
This PR contains some of the changes I made in my fork that I find to be quite useful.
This change adds some new flags that enable better compatibility with running the assistant in a script:
Normally, --non-interactive and --once would be passed together such that a single non-interactive conversation would take place (i.e. in the use-case of binding the assistant to run when a key is pressed).
Thoughts?