fix: removed beta from current date (#4901)
* Removed beta from current date * [autofix.ci] apply automated fixes * refactor: improve error message handling in CloudflareWorkersAIEmbeddings * Fix filter sidebar test --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
parent
8b04954a0e
commit
79e3d3f50d
3 changed files with 8 additions and 4 deletions
|
|
@ -75,6 +75,7 @@ class CloudflareWorkersAIEmbeddingsComponent(LCModelComponent):
|
||||||
strip_new_lines=self.strip_new_lines,
|
strip_new_lines=self.strip_new_lines,
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ValueError(f"Could not connect to CloudflareWorkersAIEmbeddings API: {e!s}") from e
|
msg = f"Could not connect to CloudflareWorkersAIEmbeddings API: {e!s}"
|
||||||
|
raise ValueError(msg) from e
|
||||||
|
|
||||||
return embeddings
|
return embeddings
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ class CurrentDateComponent(Component):
|
||||||
display_name = "Current Date"
|
display_name = "Current Date"
|
||||||
description = "Returns the current date and time in the selected timezone."
|
description = "Returns the current date and time in the selected timezone."
|
||||||
icon = "clock"
|
icon = "clock"
|
||||||
beta = True
|
|
||||||
name = "CurrentDate"
|
name = "CurrentDate"
|
||||||
|
|
||||||
inputs = [
|
inputs = [
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,9 @@ test(
|
||||||
page.getByTestId("langchain_utilitiesConversationChain"),
|
page.getByTestId("langchain_utilitiesConversationChain"),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
|
||||||
await expect(page.getByTestId("helpersCurrent Date")).toBeVisible();
|
await expect(
|
||||||
|
page.getByTestId("langchain_utilitiesPrompt Hub"),
|
||||||
|
).toBeVisible();
|
||||||
|
|
||||||
await page.getByTestId("sidebar-options-trigger").click();
|
await page.getByTestId("sidebar-options-trigger").click();
|
||||||
await page.getByTestId("sidebar-beta-switch").isVisible({ timeout: 5000 });
|
await page.getByTestId("sidebar-beta-switch").isVisible({ timeout: 5000 });
|
||||||
|
|
@ -114,7 +116,9 @@ test(
|
||||||
await expect(page.getByTestId("sidebar-beta-switch")).not.toBeChecked();
|
await expect(page.getByTestId("sidebar-beta-switch")).not.toBeChecked();
|
||||||
await page.getByTestId("sidebar-options-trigger").click();
|
await page.getByTestId("sidebar-options-trigger").click();
|
||||||
|
|
||||||
await expect(page.getByTestId("helpersCurrent Date")).not.toBeVisible();
|
await expect(
|
||||||
|
page.getByTestId("langchain_utilitiesPrompt Hub"),
|
||||||
|
).not.toBeVisible();
|
||||||
|
|
||||||
await page.getByTestId("sidebar-filter-reset").click();
|
await page.getByTestId("sidebar-filter-reset").click();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue