remove prints

This commit is contained in:
Lidia 2025-04-11 11:18:07 +02:00
parent 083d03c9a1
commit b1e60d0284
2 changed files with 12 additions and 12 deletions

View File

@ -358,10 +358,10 @@ class OpenAIChatCompletionsModel(Model):
# Create streaming context if needed
streaming_context = None
if should_show_rich_stream:
print(f"\nDEBUG: Creating streaming context with initial stats:")
print(f"DEBUG: Model: {str(self.model)}")
print(f"DEBUG: Agent name: {self.agent_name}")
print(f"DEBUG: Counter: {self.interaction_counter}")
#print(f"\nDEBUG: Creating streaming context with initial stats:")
#print(f"DEBUG: Model: {str(self.model)}")
#print(f"DEBUG: Agent name: {self.agent_name}")
#print(f"DEBUG: Counter: {self.interaction_counter}")
streaming_context = create_agent_streaming_context(
agent_name=self.agent_name,
counter=self.interaction_counter,
@ -772,7 +772,7 @@ class OpenAIChatCompletionsModel(Model):
interaction_cost = max(float(interaction_cost if interaction_cost is not None else 0.0), 0.00001)
total_cost = max(float(total_cost if total_cost is not None else 0.0), 0.00001)
print(f"DEBUG: Final direct cost calculations - Interaction: ${interaction_cost:.6f}, Total: ${total_cost:.6f}")
#print(f"DEBUG: Final direct cost calculations - Interaction: ${interaction_cost:.6f}, Total: ${total_cost:.6f}")
# Create final stats with explicit type conversion for all values
final_stats = {
@ -791,8 +791,8 @@ class OpenAIChatCompletionsModel(Model):
"total_cost": float(total_cost),
}
print(f"DEBUG: Final stats costs (from dictionary) - Interaction: ${final_stats['interaction_cost']:.6f}, Total: ${final_stats['total_cost']:.6f}")
print(f"DEBUG: Cost types in dictionary - Interaction: {type(final_stats['interaction_cost'])}, Total: {type(final_stats['total_cost'])}")
#print(f"DEBUG: Final stats costs (from dictionary) - Interaction: ${final_stats['interaction_cost']:.6f}, Total: ${final_stats['total_cost']:.6f}")
#print(f"DEBUG: Cost types in dictionary - Interaction: {type(final_stats['interaction_cost'])}, Total: {type(final_stats['total_cost'])}")
# At the end of streaming, finish the streaming context if we were using it
if streaming_context:

View File

@ -577,7 +577,7 @@ def finish_agent_streaming(context, final_stats=None):
# If we have token stats, add them
tokens_text = None
if final_stats:
print(f"\nDEBUG finish_agent_streaming: Received final_stats: {final_stats}")
#print(f"\nDEBUG finish_agent_streaming: Received final_stats: {final_stats}")
interaction_input_tokens = final_stats.get("interaction_input_tokens")
interaction_output_tokens = final_stats.get("interaction_output_tokens")
@ -590,8 +590,8 @@ def finish_agent_streaming(context, final_stats=None):
interaction_cost = float(final_stats.get("interaction_cost", 0.0))
total_cost = float(final_stats.get("total_cost", 0.0))
print(f"\nDEBUG finish_agent_streaming: Received costs from final_stats - Interaction: {interaction_cost}, Total: {total_cost}")
print(f"DEBUG finish_agent_streaming: Type of interaction_cost: {type(interaction_cost)}, Type of total_cost: {type(total_cost)}")
#print(f"\nDEBUG finish_agent_streaming: Received costs from final_stats - Interaction: {interaction_cost}, Total: {total_cost}")
#print(f"DEBUG finish_agent_streaming: Type of interaction_cost: {type(interaction_cost)}, Type of total_cost: {type(total_cost)}")
if (interaction_input_tokens is not None and
interaction_output_tokens is not None and
@ -606,8 +606,8 @@ def finish_agent_streaming(context, final_stats=None):
if total_cost is None or total_cost == 0.0:
total_cost = calculate_model_cost(context["model"], total_input_tokens, total_output_tokens)
print(f"DEBUG finish_agent_streaming: Costs before passing to _create_token_display - Interaction: {interaction_cost}, Total: {total_cost}")
print(f"DEBUG finish_agent_streaming: Type of costs before passing - Interaction: {type(interaction_cost)}, Total: {type(total_cost)}")
#print(f"DEBUG finish_agent_streaming: Costs before passing to _create_token_display - Interaction: {interaction_cost}, Total: {total_cost}")
#print(f"DEBUG finish_agent_streaming: Type of costs before passing - Interaction: {type(interaction_cost)}, Total: {type(total_cost)}")
tokens_text = _create_token_display(
interaction_input_tokens,