diff --git a/gpt_researcher/actions/report_generation.py b/gpt_researcher/actions/report_generation.py index 71ebea666..408a1b8d7 100644 --- a/gpt_researcher/actions/report_generation.py +++ b/gpt_researcher/actions/report_generation.py @@ -246,6 +246,21 @@ async def generate_report( cost_callback=cost_callback, ) except Exception as e: - print(f"Error in generate_report: {e}") + try: + report = await create_chat_completion( + model=cfg.smart_llm_model, + messages=[ + {"role": "user", "content": f"{agent_role_prompt}\n\n{content}"}, + ], + temperature=0.35, + llm_provider=cfg.smart_llm_provider, + stream=True, + websocket=websocket, + max_tokens=cfg.smart_token_limit, + llm_kwargs=cfg.llm_kwargs, + cost_callback=cost_callback, + ) + except: + print(f"Error in generate_report: {e}") return report