wzf2000 / MACRec

Source codes for paper "MACRec: A Multi-Agent Collaboration Framework for Recommendation" at SIGIR 2024
45 stars 2 forks source link

openai.LengthFinishReasonError #2

Closed maximum2974 closed 3 weeks ago

maximum2974 commented 1 month ago

Description:
I encountered the following error while running the following command according to the README instructions:

python main.py --main Evaluate --data_file data/ml-100k/test.csv --system collaboration --system_config config/systems/collaboration/reflect_analyse_search.json --task sr

The error message is:

openai.LengthFinishReasonError: Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=300, prompt_tokens=513, total_tokens=813, completion_tokens_details=CompletionTokensDetails(audio_tokens=None, reasoning_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=0))

Any guidance on how to resolve this error or adjust the configuration to avoid the length limit issue would be greatly appreciated.

wzf2000 commented 1 month ago

You can adjust the max_tokens settings for each agent in the config/agents/ directory. This will allow the model to generate longer responses.