diff --git a/backend/chainlit/langchain/callbacks.py b/backend/chainlit/langchain/callbacks.py index 04b0dae82d..984471ebae 100644 --- a/backend/chainlit/langchain/callbacks.py +++ b/backend/chainlit/langchain/callbacks.py @@ -459,7 +459,7 @@ def _get_completion(self, generation: Dict): else: return kwargs.get("content", ""), None else: - return generation.get("text", "") + return generation.get("text", ""), None def on_chat_model_start( self, @@ -582,7 +582,6 @@ def _on_run_update(self, run: Run) -> None: ) generations = (run.outputs or {}).get("generations", []) completion, language = self._get_completion(generations[0][0]) - current_prompt = ( self.prompt_sequence.pop() if self.prompt_sequence else None )