diff --git a/apps/copilot/copilot.py b/apps/copilot/copilot.py index 817275f5..e8537d4f 100644 --- a/apps/copilot/copilot.py +++ b/apps/copilot/copilot.py @@ -98,7 +98,6 @@ User: {last_message.content} response = completions_client.chat.completions.create( model=PROVIDER_COPILOT_MODEL, messages=updated_msgs, - temperature=0.0, response_format={"type": "json_object"} ) diff --git a/apps/copilot/streaming.py b/apps/copilot/streaming.py index 24a71b5f..5c428b5d 100644 --- a/apps/copilot/streaming.py +++ b/apps/copilot/streaming.py @@ -123,7 +123,6 @@ User: {last_message.content} return completions_client.chat.completions.create( model=PROVIDER_COPILOT_MODEL, messages=updated_msgs, - temperature=0.0, stream=True ) @@ -198,4 +197,4 @@ def create_app(): if __name__ == '__main__': app = create_app() print("Starting Flask server...") - app.run(port=3002, host='0.0.0.0', debug=True) \ No newline at end of file + app.run(port=3002, host='0.0.0.0', debug=True) \ No newline at end of file diff --git a/apps/rowboat_agents/src/graph/execute_turn.py b/apps/rowboat_agents/src/graph/execute_turn.py index 353078ce..2b4da5cf 100644 --- a/apps/rowboat_agents/src/graph/execute_turn.py +++ b/apps/rowboat_agents/src/graph/execute_turn.py @@ -176,7 +176,7 @@ def get_rag_tool(config: dict, complete_request: dict) -> FunctionTool: return tool else: return None - + DEFAULT_MAX_CALLS_PER_PARENT_AGENT = 3 def get_agents(agent_configs, tool_configs, complete_request): @@ -256,8 +256,7 @@ def get_agents(agent_configs, tool_configs, complete_request): instructions=agent_instructions, handoff_description=agent_config["description"], tools=new_tools, - model = model, - model_settings=ModelSettings(temperature=0.0) + model = model ) # Set the max calls per parent agent @@ -289,7 +288,7 @@ def get_agents(agent_configs, tool_configs, complete_request): new_agent.handoffs = [] # Look up the agent's children from the old agent and create a list called handoffs in new_agent with pointers to the children in new_agents new_agent.handoffs = [new_agents[new_agent_name_to_index[child]] for child in new_agent_to_children[new_agent.name]] - + print("Returning created agents") print("="*100) return new_agents @@ -342,11 +341,11 @@ async def run_streamed( # Get the stream result without trace context first stream_result = Runner.run_streamed(agent, formatted_messages) - + # If tracing is enabled, wrap the stream_events to handle tracing if enable_tracing: original_stream_events = stream_result.stream_events - + async def wrapped_stream_events(): # Create trace context inside the async function with trace(f"Agent turn: {agent.name}") as trace_ctx: @@ -359,9 +358,9 @@ async def run_streamed( except Exception as e: print(f"Error in stream events: {str(e)}") raise - + stream_result.stream_events = wrapped_stream_events - + return stream_result except Exception as e: print(f"Error during streaming run: {str(e)}")