Skip to content
Merged
6 changes: 3 additions & 3 deletions .github/workflows/typescript_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,12 @@ jobs:

echo "Total tests to run: $TEST_COUNT"

# Calculate optimal shard count - 1 shard per 5 tests, min 1, max 10
# Calculate optimal shard count - 1 shard per 5 tests, min 1, max 40
SHARD_COUNT=$(( (TEST_COUNT + 4) / 5 ))
if [ $SHARD_COUNT -lt 1 ]; then
SHARD_COUNT=1
elif [ $SHARD_COUNT -gt 10 ]; then
SHARD_COUNT=10
elif [ $SHARD_COUNT -gt 40 ]; then
SHARD_COUNT=40
fi

# Create the matrix combinations string
Expand Down
10 changes: 3 additions & 7 deletions src/backend/base/langflow/components/processing/split_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ class SplitTextComponent(Component):
]

outputs = [
Output(display_name="Chunks", name="chunks", method="split_text"),
Output(display_name="DataFrame", name="dataframe", method="as_dataframe"),
Output(display_name="Chunks", name="dataframe", method="split_text"),
]

def _docs_to_data(self, docs) -> list[Data]:
Expand Down Expand Up @@ -133,8 +132,5 @@ def split_text_base(self):
msg = f"Error splitting text: {e}"
raise TypeError(msg) from e

def split_text(self) -> list[Data]:
return self._docs_to_data(self.split_text_base())

def as_dataframe(self) -> DataFrame:
return DataFrame(self.split_text())
def split_text(self) -> DataFrame:
return DataFrame(self._docs_to_data(self.split_text_base()))
Loading
Loading