diff --git a/src/codeinterpreterapi/callbacks/markdown/callbacks.py b/src/codeinterpreterapi/callbacks/markdown/callbacks.py index 0442474d..ea757430 100644 --- a/src/codeinterpreterapi/callbacks/markdown/callbacks.py +++ b/src/codeinterpreterapi/callbacks/markdown/callbacks.py @@ -24,7 +24,8 @@ def on_llm_start(self, serialized: Dict[str, Any], prompts: List[str], **kwargs: def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None: self._write_header("LLM End") - self._write_to_file(response.llm_output) + if response.llm_output: + self._write_to_file(response.llm_output) for generation in response.generations[0]: self._write_to_file(f"```\n{generation.text}\n```\n\n") self._write_to_file("---\n\n") diff --git a/src/codeinterpreterapi/crew/crew_agent.py b/src/codeinterpreterapi/crew/crew_agent.py index ebe341f2..eae7159f 100644 --- a/src/codeinterpreterapi/crew/crew_agent.py +++ b/src/codeinterpreterapi/crew/crew_agent.py @@ -74,8 +74,10 @@ def run(self, inputs: Dict, plan_list: CodeInterpreterPlanList): if plan_list is None: return {} tasks = self.create_tasks(final_goal=inputs["input"], plan_list=plan_list) + crew_inputs = {"input": inputs.get("input", "")} my_crew = Crew(agents=self.agents, tasks=tasks) - result = my_crew.kickoff(inputs=inputs) + print("CodeInterpreterCrew.kickoff() crew_inputs=", crew_inputs) + result = my_crew.kickoff(inputs=crew_inputs) return result