autogen
autogen copied to clipboard
[Issue]: Agent code gets cutoff
Describe the issue
Is there a way to increase the output length of agent. On increasing the complexity of the question, agent code gets cutoff (See the last line of the response)
Steps to reproduce
Using the default system message for agent. User_proxy feedback set to always. LLM is opensource Qwen 72 B
Screenshots and logs
How is the aggregated monthly BTL revenue in December 2023 compared to average of previous 3 months? All calculations should be aggregated on monthly level. Include absolute numbers and percentage change in the answer
analyst (to user_proxy):
Sure! To answer this question, we'll need to group the data by month and year, calculate the average BTL revenue for the previous three months, and then compare it with the BTL revenue in December 2023. Here's the Python code to accomplish this:
# filename: btl_revenue_analysis.py
import pandas as pd
df = pd.read_csv("/workspace/PP_PS_Revenues.csv")
# Group the data by month and year
monthly_df = df.groupby(['Years', 'Months'])[['BTL_Revenue']].sum().reset_index()
# Calculate the average BTL revenue for the previous three months
prev_three_months = monthly_df[(monthly_df['Months'] >= 9) & (monthly_df['Years'] <= 2023)]
avg_prev_btl_revenue = prev_three_months['BTL_Revenue'].mean()
# Get the BTL revenue in December 2023
december_2023_btl_revenue = monthly_df[(monthly_df['Years'] == 2023) & (monthly_df['Months'] == 12)]['BTL_Revenue']
# Compare the two values
if december_2023_btl_revenue > avg_prev_btl_revenue:
percentage_change = ((december_2023_btl_revenue - avg_prev_btl_revenue) / avg_prev_btl_revenue) * 100
print(f"The aggregated monthly BTL revenue in December 2023 ({december_2023_btl_revenue:.2f}) is {percentage_change:.2f}% higher than the average of the previous three months ({avg_prev_btl_revenue:.2f}).")
elif december_2023_btl_revenue < avg_prev_btl_revenue:
percentage_change = ((avg_prev_btl_revenue - december_2023_btl_revenue) / avg_prev_btl_revenue) * 100
print(f"The aggregated monthly BTL revenue in December 2023 ({december_2023_btl_revenue:.2f}) is {percentage_change:.2f}% lower than the average of the previous three months ({avg_prev_btl_revenue:.2f}).")
else:
print(f"The aggregated monthly BTL revenue in December 2023 ({december_2023_btl_revenue
--------------------------------------------------------------------------------
Provide feedback to analyst. Press enter to skip and use auto-reply, or type 'exit' to end the conversation:
### Additional Information
_No response_
This maybe limited by the context length of the model you are using or any parameters set to change max response length?