From d764c3ff3bdc590187aa8c632ac205814dfe4ee5 Mon Sep 17 00:00:00 2001 From: luijait Date: Thu, 8 May 2025 13:04:31 +0200 Subject: [PATCH] Delete useless break lines --- src/cai/sdk/agents/models/openai_chatcompletions.py | 8 ++++---- src/cai/util.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cai/sdk/agents/models/openai_chatcompletions.py b/src/cai/sdk/agents/models/openai_chatcompletions.py index 279bd36c..5eb36c90 100644 --- a/src/cai/sdk/agents/models/openai_chatcompletions.py +++ b/src/cai/sdk/agents/models/openai_chatcompletions.py @@ -638,8 +638,8 @@ class OpenAIChatCompletionsModel(Model): # If we're using rich context, we'll add separation through that pass else: - # Print clear visual separator - print("\n") + # Removed clear visual separator to avoid blank lines during streaming + pass try: async for chunk in stream: @@ -1179,8 +1179,8 @@ class OpenAIChatCompletionsModel(Model): # Use the direct copy with guaranteed float costs finish_agent_streaming(streaming_context, direct_stats) - # Add visual separation after agent output completes - print("\n") + # Removed extra newline after streaming completes to avoid blank lines + pass if tracing.include_data(): span_generation.span_data.output = [final_response.model_dump()] diff --git a/src/cai/util.py b/src/cai/util.py index 2e66eafc..1555159f 100644 --- a/src/cai/util.py +++ b/src/cai/util.py @@ -641,7 +641,7 @@ def cli_print_tool_call(tool_name="", args="", output="", prefix=" "): if not tool_name: return - print(f"\n{prefix}{color('Tool Call:', fg='cyan')}") + print(f"{prefix}{color('Tool Call:', fg='cyan')}") print(f"{prefix}{color('Name:', fg='cyan')} {tool_name}") if args: print(f"{prefix}{color('Args:', fg='cyan')} {args}")