From f4b9cf24e35496dcca5fabd469bc75111c6b573a Mon Sep 17 00:00:00 2001 From: Misha Iakovlev Date: Tue, 15 Jul 2025 11:13:45 +0100 Subject: [PATCH 1/2] Add an option to disable response streaming --- src/bespoken/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bespoken/__main__.py b/src/bespoken/__main__.py index 2992d25..fff670e 100644 --- a/src/bespoken/__main__.py +++ b/src/bespoken/__main__.py @@ -129,6 +129,7 @@ def chat( system_prompt: Optional[str] = typer.Option(None, "--system", "-s", help="System prompt for the assistant"), tools: list = None, slash_commands: dict = None, + stream: bool = typer.Option(True, "--stream", "-s", help="Stream the response from the LLM", default=True), ): """Run the bespoken chat assistant.""" # Set debug mode globally @@ -197,7 +198,7 @@ def chat( response_started = False with Live(padded_spinner, console=console, refresh_per_second=10) as live: - for chunk in conversation.chain(out, system=system_prompt): + for chunk in conversation.chain(out, system=system_prompt, stream=stream): if not response_started: # First chunk received, stop the spinner live.stop() From d66e28b17fa540009c62f11912159b3c494d6c6d Mon Sep 17 00:00:00 2001 From: Misha Iakovlev Date: Tue, 15 Jul 2025 12:07:18 +0100 Subject: [PATCH 2/2] Remove duplicate parameter --- src/bespoken/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bespoken/__main__.py b/src/bespoken/__main__.py index 44468d0..8608e47 100644 --- a/src/bespoken/__main__.py +++ b/src/bespoken/__main__.py @@ -133,7 +133,7 @@ def chat( tools: list = None, slash_commands: dict = None, history_callback: Optional[Callable] = None, - stream: bool = typer.Option(True, "--stream", "-s", help="Stream the response from the LLM", default=True), + stream: bool = typer.Option(True, "--stream", "-s", help="Stream the response from the LLM"), ): """Run the bespoken chat assistant.""" # Set debug mode globally