diff --git a/backend/chainlit/langchain/callbacks.py b/backend/chainlit/langchain/callbacks.py index 81c6fb52c9..f7c03c30b7 100644 --- a/backend/chainlit/langchain/callbacks.py +++ b/backend/chainlit/langchain/callbacks.py @@ -525,11 +525,13 @@ def _on_run_update(self, run: Run) -> None: # find first message with prompt_id for m in chat_start["input_messages"]: if m.additional_kwargs.get("prompt_id"): - current_step.generation.prompt_id = m.additional_kwargs["prompt_id"] + current_step.generation.prompt_id = m.additional_kwargs[ + "prompt_id" + ] if custom_variables := m.additional_kwargs.get("variables"): current_step.generation.variables = custom_variables break - + current_step.language = "json" current_step.output = json.dumps(message_completion) else: @@ -558,8 +560,6 @@ def _on_run_update(self, run: Run) -> None: self._run_sync(current_step.update()) if self.final_stream and self.has_streamed_final_answer: - if self.final_stream.content: - self.final_stream.content = completion self._run_sync(self.final_stream.update()) return diff --git a/backend/pyproject.toml b/backend/pyproject.toml index f7b2715301..a0a6ba0c36 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "chainlit" -version = "1.0.400" +version = "1.0.401" keywords = ['LLM', 'Agents', 'gen ai', 'chat ui', 'chatbot ui', 'openai', 'copilot', 'langchain', 'conversational ai'] description = "Build Conversational AI." authors = ["Chainlit"]