@@ -26,7 +26,7 @@ async def run_consensus(
2626 :param consensus_config: An instance of ConsensusConfig.
2727 """
2828 response_data = {}
29- response_data [' initial_conversation' ] = consensus_config .initial_prompt
29+ response_data [" initial_conversation" ] = consensus_config .initial_prompt
3030
3131 # Step 1: Initial round.
3232 responses = await consensus .send_round (client , consensus_config )
@@ -35,8 +35,8 @@ async def run_consensus(
3535 )
3636 logger .info ("initial response aggregation complete" )
3737
38- response_data [' iteration_0' ] = responses
39- response_data [' aggregate_0' ] = aggregated_response
38+ response_data [" iteration_0" ] = responses
39+ response_data [" aggregate_0" ] = aggregated_response
4040
4141 # Step 2: Improvement rounds.
4242 for i in range (consensus_config .iterations ):
@@ -46,10 +46,10 @@ async def run_consensus(
4646 aggregated_response = await aggregator .async_centralized_llm_aggregator (
4747 client , consensus_config .aggregator_config , responses
4848 )
49- print ( f" \n The responses have been aggregated after iteration { i + 1 } ." )
49+ logger . info ( " responses aggregated" , iteration = i + 1 )
5050
51- response_data [f' iteration_{ i + 1 } ' ] = responses
52- response_data [f' aggregate_{ i + 1 } ' ] = aggregated_response
51+ response_data [f" iteration_{ i + 1 } " ] = responses
52+ response_data [f" aggregate_{ i + 1 } " ] = aggregated_response
5353
5454 # Step 3: Save final consensus.
5555 output_file = config .data_path / "final_consensus.json"
0 commit comments