Nightly Build #358
Annotations
1 error and 2 warnings
Run unit tests:
src/backend/tests/src/backend/tests/base.py#L128
TestChatOutput.test_component_versions[1.0.17]
AssertionError: Failed to execute component TestChatOutput for version 1.0.17:
Module: outputs
File: ChatOutput
Error: All of session_id, sender, and sender_name must be provided.
Component Code: from langflow.base.io.chat import ChatComponent
from langflow.inputs import BoolInput
from langflow.io import DropdownInput, MessageTextInput, Output
from langflow.memory import store_message
from langflow.schema.message import Message
from langflow.utils.constants import MESSAGE_SENDER_NAME_AI, MESSAGE_SENDER_USER, MESSAGE_SENDER_AI
class ChatOutput(ChatComponent):
display_name = "Chat Output"
description = "Display a chat message in the Playground."
icon = "ChatOutput"
name = "ChatOutput"
inputs = [
MessageTextInput(
name="input_value",
display_name="Text",
info="Message to be passed as output.",
),
BoolInput(
name="should_store_message",
display_name="Store Messages",
info="Store the message in the history.",
value=True,
advanced=True,
),
DropdownInput(
name="sender",
display_name="Sender Type",
options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],
value=MESSAGE_SENDER_AI,
advanced=True,
info="Type of sender.",
),
MessageTextInput(
name="sender_name",
display_name="Sender Name",
info="Name of the sender.",
value=MESSAGE_SENDER_NAME_AI,
advanced=True,
),
MessageTextInput(
name="session_id",
display_name="Session ID",
info="The session ID of the chat. If empty, the current session ID parameter will be used.",
advanced=True,
),
MessageTextInput(
name="data_template",
display_name="Data Template",
value="{text}",
advanced=True,
info="Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
),
]
outputs = [
Output(display_name="Message", name="message", method="message_response"),
]
def message_response(self) -> Message:
message = Message(
text=self.input_value,
sender=self.sender,
sender_name=self.sender_name,
session_id=self.session_id,
)
if (
self.session_id
and isinstance(message, Message)
and isinstance(message.text, str)
and self.should_store_message
):
store_message(
message,
flow_id=self.graph.flow_id,
)
self.message.value = message
self.status = message
return message
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Run unit tests
Attempt 1 failed. Reason: Child_process exited with error code 2
|
Loading