@@ -311,6 +311,7 @@ def get_new_explanation( # noqa: D417
311311 optimized_throughput : str | None = None ,
312312 throughput_improvement : str | None = None ,
313313 function_references : str | None = None ,
314+ codeflash_version : str = codeflash_version ,
314315 ) -> str :
315316 """Optimize the given python code for performance by making a request to the Django endpoint.
316317
@@ -330,6 +331,7 @@ def get_new_explanation( # noqa: D417
330331 - original_throughput: str | None - throughput for the baseline code (operations per second)
331332 - optimized_throughput: str | None - throughput for the optimized code (operations per second)
332333 - throughput_improvement: str | None - throughput improvement percentage
334+ - current codeflash version
333335 - function_references: str | None - where the function is called in the codebase
334336
335337 Returns
@@ -354,6 +356,7 @@ def get_new_explanation( # noqa: D417
354356 "optimized_throughput" : optimized_throughput ,
355357 "throughput_improvement" : throughput_improvement ,
356358 "function_references" : function_references ,
359+ "codeflash_version" : codeflash_version ,
357360 }
358361 logger .info ("loading|Generating explanation" )
359362 console .rule ()
@@ -605,6 +608,7 @@ def get_optimization_review(
605608 "benchmark_details" : explanation .benchmark_details if explanation .benchmark_details else None ,
606609 "optimized_runtime" : humanize_runtime (explanation .best_runtime_ns ),
607610 "original_runtime" : humanize_runtime (explanation .original_runtime_ns ),
611+ "codeflash_version" : codeflash_version ,
608612 "calling_fn_details" : calling_fn_details ,
609613 "python_version" : platform .python_version (),
610614 }
0 commit comments