Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: playground img not working #3980

Merged
merged 12 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@
def build_parser(self) -> OutputParser:
if self.parser_type == "CSV":
return CommaSeparatedListOutputParser()
else:
raise ValueError("Unsupported or missing parser")
raise ValueError("Unsupported or missing parser")

Check failure on line 37 in src/backend/base/langflow/components/output_parsers/OutputParser.py

View workflow job for this annotation

GitHub Actions / Ruff Style Check (3.12)

Ruff (EM101)

src/backend/base/langflow/components/output_parsers/OutputParser.py:37:26: EM101 Exception must not use a string literal, assign to variable first

def format_instructions(self) -> Message:
if self.parser_type == "CSV":
return Message(text=CommaSeparatedListOutputParser().get_format_instructions())
else:
raise ValueError("Unsupported or missing parser")
raise ValueError("Unsupported or missing parser")

Check failure on line 42 in src/backend/base/langflow/components/output_parsers/OutputParser.py

View workflow job for this annotation

GitHub Actions / Ruff Style Check (3.12)

Ruff (EM101)

src/backend/base/langflow/components/output_parsers/OutputParser.py:42:26: EM101 Exception must not use a string literal, assign to variable first
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def from_message(cls, message: "Message", flow_id: str | UUID | None = None):
if hasattr(file, "path") and hasattr(file, "url") and file.path:
session_id = message.session_id
image_paths.append(f"{session_id}{file.path.split(session_id)[1]}")
message.files = image_paths
if image_paths:
message.files = image_paths

if isinstance(message.timestamp, str):
timestamp = datetime.fromisoformat(message.timestamp)
else:
Expand Down
Loading