Feat: create new tavily bundle (#8163)
* delete data and transfer data to dataframe * [autofix.ci] apply automated fixes * create a new bundle for search * fix type for dataframe * add data_to_dataframe function * [autofix.ci] apply automated fixes * fix test because of files movement * delete message and text * json update * fix search yahoo test * add tavily bundle * feat: adds new Edit Details popover, removes flow menu, fixes nav alignment, adds new Flow Status overlay (#8087) * Updated flow settings component size * Added FlowSettingsComponent to contain modal content * Removed unused imports * Changed Flow Settings Modal to use new component * Changed Flow Menu styling, removing Saved and context menu, and adding a direct click to edit flow info * Removed unused styling * Updated nav position and truncation * updated alert styling * Added z index to header * Added flow settings coming from the bottom * Changed flow settings to not crash when there is no flow * Removed unused imports * Implemented flow details using popover * Removed onClick * Changed canvas controls position and color * Changed panel tooltip side and classes * Added log canvas component * Added children to flow logs modal * Added log canvas component into page * Changed position and shadow of canvas controls * removed endpoint name from edit flow settings * added endpoint name change into tweaks modal * Added endpoint editing to tweaks * Implemented storing the error in the flowBuildStatus * Updated type * Added Flow Building Component * Added Flow Building Component implementation * Added red color * Added past build flow params * Implemented design of flowBuildingComponent * Implemented build error storing on flowStore * Implemented build error on flow store * Changed notifications test * Set build error as null when building * Reset build error when exiting flow * Changed from error to buildError * Changed flowStore to have buildInfo instead of buildError * Changed flowBuildingComponent to have buildInfo and display successful builds * Added handleDismissed instead of setting dismissed as true * Updated tests to current Update implementation * Updated tests to remove click on built successfully * Updated tests and data-testid to match new Flow Name editing behavior * fixed auto login test * Fixed edit-flow-name test and save changes on node * fixed tests * Changed Share to Publish and added test ids * added Rename Flow util for tests * Changed tests to use new RenameFlow * Fixed auto save off * Added data test id to flow building component * Removed pulsing from Name Invalid * Made name editable but not saveable when invalid * Added character name reached on description * Added transition on pencil * Modularized alert store to separate notification history and notifications * Added errors to notification history * Fixed flow building component position and update all components * Fixed animations * Fixed animation * Added same animation to Update All Components * Updated animations to make update only appear when flow building is not appearing * fix flow settings test * Fixed build status not being redefined * ✨ (UpdateAllComponents/index.tsx): Refactor containerVariants to CONTAINER_VARIANTS for consistency and readability 📝 (visual-variants.ts): Add visual variants for buttons and time in flowBuildingComponent ♻️ (flowBuildingComponent/index.tsx): Import visual variants from separate file for better organization and maintainability * Fixed offset width of time --------- Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> * fix: fix regex on mcp server tab test (#8175) * Fixed MCP Server Tab Test * Fixed mcp server tab test * Added timeout to test * Added retry to mcp server tab test * docs: cookie-banner-link (#8179) cookie-banner-link * fix: removed fit view that caused duck duck go test to fail (#8178) fixed duck duck go test to not fail * feat: Enhance API request component (#8070) * update the api request component * [autofix.ci] apply automated fixes * update the component * Update test_api_request_component.py * [autofix.ci] apply automated fixes * remove MODE_CONFIG unused variable * [autofix.ci] apply automated fixes * use normalize function * Update template * Update test_api_request_component.py * UI test fix * selector fix --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com> Co-authored-by: Mike Fortman <michael.fortman@datastax.com> * docs: system assist component (#8089) * sidebars * initial-content * more * update * trailing-spaces * example * standardize-naming * shorten-introduction-and-remove-client * Apply suggestions from code review Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com> * Update docs/docs/Integrations/Nvidia/integrations-nvidia-system-assist.md --------- Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com> * docs: deploy langflow with caddyfile and docker compose (#8120) * initial-content * not-json * clarify-public key * more-accessible-name-and-context * exit-session * fix: simplify GetStartedProgress percentage calculation logic (#8183) 🐛 (get-started-progress.tsx): fix calculation of totalPercentage to correctly display progress bar percentage 💡 (get-started-progress.tsx): refactor logic to calculate totalPercentage based on user opt-ins and flows * fix: set cursor to text in text fields (#8173) Fixed cursor being default in input fields * feat: add datastax components bundle (#8184) * feat: add datastax components bundle * Update __init__.py * Remove old astra assistants folder * Remove old tools * Update __init__.py * Update test_assistants_components.py --------- Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * feat: updated components header styling (#8085) * Removed unused styles * Updated node icon to follow design * Updated node name to follow design and include Beta * Removed Beta from node status * Removed unused classes and parameters from GenericNode * Changed node description padding on input * Changed paddings and gaps * removed unused classes * Added accent purple foreground color to Experimental * Fixed classes and gaps in generic node * Fixed node name gaps * Fixed node status classes and styling * Removed unused classes and changed run-bg size * Changed test to use new test id * Changed Node Name to have beta tooltip * Changed Build Failed icon to be a circle alert * Changed Node Status gap and conditions to show spacings correctly * Changed padding to not change height of other components * Changed nodeStatus to show validation on small node * Changed classes to show correct spacing and overflow * Changed description size * Fixed description text size * Fixed input margin * Fixed description editing not appearing when no description is available * Fixed status not breaking words * Updated colors * Updated node output color * [autofix.ci] apply automated fixes * Changed duration style in chat * Re-added output color * Updated timeout on mcp server tab test * Added more timeout to mcp server tab test * fixed loop component test --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * ref: SQL component (#8185) * update sql * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: Loop uplift dataframe input and output (#8177) * tests cases * update to loop * Update component.py * 📝 (LoopTemplate.json): update value of a configuration key from "OPENAI_API_KEY" to "ANTHROPIC_API_KEY" in order to reflect the correct API key being used * update json test loop * add dataframe support for the loop component * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * fix: starter project * update loop component and tests * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * update logic * Update loop_basic.py * Update Research Translation Loop.json * fix lint * format fix * [autofix.ci] apply automated fixes * reverting changes in component and vertex base * [autofix.ci] apply automated fixes * fix lint errors * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * update in the loop templates and component * [autofix.ci] apply automated fixes * Update Research Translation Loop.json * update tests * update the code and deprecate the old loop * [autofix.ci] apply automated fixes * Update loop_basic.py * WIP FIX Loop Tests * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes * ✨ (loop-component.spec.ts): Update test cases to use more descriptive names for components and actions for better clarity and understanding. * ✨ (loop-component.spec.ts): refactor loop component tests to improve readability and maintainability by updating test selectors and removing redundant test steps * update * Update loop-component.spec.ts * Update Research Translation Loop.json * Update Research Translation Loop.json * Update Research Translation Loop.json * Update Research Translation Loop.json * loop test fix --------- Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> Co-authored-by: Rodrigo <rodrigosilvanader@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com> Co-authored-by: Mike Fortman <michael.fortman@datastax.com> * fix: fixes nightly tests (#8194) * fix: mcp test when there are a lot of flows (#8197) * tests: increase benchmark timeouts from 10 to 30s (#8188) Increase benchmark timeouts from 10 to 30s Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com> * feat: News Search Component (#8190) * Create news_search.py * add tests * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: Add deactivated state checks in TracingService methods (#8128) fix: add deactivated state checks in TracingService methods * ref: Deprecate regex and update data components (#8191) * update * Update update_data.py * feat: add llm keywords to language model base (#8115) * update the keywords * Update test_chatollama_component.py * [autofix.ci] apply automated fixes --------- Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: import bug (#8199) fix import bug Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com> * [autofix.ci] apply automated fixes * create a new bundle for search * [autofix.ci] apply automated fixes * add tavily bundle * delete data and transfer data to dataframe * [autofix.ci] apply automated fixes * create a new bundle for search * fix type for dataframe * add data_to_dataframe function * [autofix.ci] apply automated fixes * fix test because of files movement * delete message and text * json update * fix search yahoo test * add tavily bundle * feat: Loop uplift dataframe input and output (#8177) * tests cases * update to loop * Update component.py * 📝 (LoopTemplate.json): update value of a configuration key from "OPENAI_API_KEY" to "ANTHROPIC_API_KEY" in order to reflect the correct API key being used * update json test loop * add dataframe support for the loop component * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * fix: starter project * update loop component and tests * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * update logic * Update loop_basic.py * Update Research Translation Loop.json * fix lint * format fix * [autofix.ci] apply automated fixes * reverting changes in component and vertex base * [autofix.ci] apply automated fixes * fix lint errors * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * update in the loop templates and component * [autofix.ci] apply automated fixes * Update Research Translation Loop.json * update tests * update the code and deprecate the old loop * [autofix.ci] apply automated fixes * Update loop_basic.py * WIP FIX Loop Tests * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes * ✨ (loop-component.spec.ts): Update test cases to use more descriptive names for components and actions for better clarity and understanding. * ✨ (loop-component.spec.ts): refactor loop component tests to improve readability and maintainability by updating test selectors and removing redundant test steps * update * Update loop-component.spec.ts * Update Research Translation Loop.json * Update Research Translation Loop.json * Update Research Translation Loop.json * Update Research Translation Loop.json * loop test fix --------- Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> Co-authored-by: Rodrigo <rodrigosilvanader@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com> Co-authored-by: Mike Fortman <michael.fortman@datastax.com> * [autofix.ci] apply automated fixes * create a new bundle for search * [autofix.ci] apply automated fixes * add tavily bundle * [autofix.ci] apply automated fixes * fix templates * Update setup.py * Update package-lock.json * Update Research Translation Loop.json * reset research translation loop * Update __init__.py * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Mike Fortman <michael.fortman@datastax.com> Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com> Co-authored-by: Eric Hare <ericrhare@gmail.com> Co-authored-by: Rodrigo <rodrigosilvanader@gmail.com> Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com> Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com> Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: Sebastián Estévez <estevezsebastian@gmail.com> Co-authored-by: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com>
This commit is contained in:
parent
a1d46220f0
commit
a0c00c015f
12 changed files with 5656 additions and 3948 deletions
4
src/backend/base/langflow/components/tavily/__init__.py
Normal file
4
src/backend/base/langflow/components/tavily/__init__.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
from .tavily_extract import TavilyExtractComponent
|
||||
from .tavily_search import TavilySearchComponent
|
||||
|
||||
__all__ = ["TavilyExtractComponent", "TavilySearchComponent"]
|
||||
|
|
@ -2,10 +2,10 @@ import httpx
|
|||
from loguru import logger
|
||||
|
||||
from langflow.custom import Component
|
||||
from langflow.helpers.data import data_to_text
|
||||
from langflow.helpers.data import data_to_dataframe
|
||||
from langflow.io import BoolInput, DropdownInput, MessageTextInput, Output, SecretStrInput
|
||||
from langflow.schema import Data
|
||||
from langflow.schema.message import Message
|
||||
from langflow.schema.dataframe import DataFrame
|
||||
|
||||
|
||||
class TavilyExtractComponent(Component):
|
||||
|
|
@ -46,10 +46,12 @@ class TavilyExtractComponent(Component):
|
|||
]
|
||||
|
||||
outputs = [
|
||||
Output(display_name="Data", name="data", method="fetch_content"),
|
||||
Output(display_name="Text", name="text", method="fetch_content_text"),
|
||||
Output(display_name="DataFrame", name="dataframe", method="fetch_content"),
|
||||
]
|
||||
|
||||
def run_model(self) -> DataFrame:
|
||||
return self.fetch_content_dataframe()
|
||||
|
||||
def fetch_content(self) -> list[Data]:
|
||||
"""Fetches and processes extracted content into a list of Data objects."""
|
||||
try:
|
||||
|
|
@ -111,9 +113,6 @@ class TavilyExtractComponent(Component):
|
|||
self.status = data_results
|
||||
return data_results
|
||||
|
||||
def fetch_content_text(self) -> Message:
|
||||
# This method should still work as it expects a list from fetch_content
|
||||
def fetch_content_dataframe(self) -> DataFrame:
|
||||
data = self.fetch_content()
|
||||
result_string = data_to_text("{text}", data)
|
||||
self.status = result_string
|
||||
return Message(text=result_string)
|
||||
return data_to_dataframe(data)
|
||||
|
|
@ -2,10 +2,10 @@ import httpx
|
|||
from loguru import logger
|
||||
|
||||
from langflow.custom import Component
|
||||
from langflow.helpers.data import data_to_text
|
||||
from langflow.helpers.data import data_to_dataframe
|
||||
from langflow.io import BoolInput, DropdownInput, IntInput, MessageTextInput, Output, SecretStrInput
|
||||
from langflow.schema import Data
|
||||
from langflow.schema.message import Message
|
||||
from langflow.schema.dataframe import DataFrame
|
||||
|
||||
|
||||
class TavilySearchComponent(Component):
|
||||
|
|
@ -108,8 +108,7 @@ class TavilySearchComponent(Component):
|
|||
]
|
||||
|
||||
outputs = [
|
||||
Output(display_name="Data", name="data", method="fetch_content"),
|
||||
Output(display_name="Text", name="text", method="fetch_content_text"),
|
||||
Output(display_name="DataFrame", name="dataframe", method="fetch_content_dataframe"),
|
||||
]
|
||||
|
||||
def fetch_content(self) -> list[Data]:
|
||||
|
|
@ -208,8 +207,6 @@ class TavilySearchComponent(Component):
|
|||
self.status = data_results
|
||||
return data_results
|
||||
|
||||
def fetch_content_text(self) -> Message:
|
||||
def fetch_content_dataframe(self) -> DataFrame:
|
||||
data = self.fetch_content()
|
||||
result_string = data_to_text("{text}", data)
|
||||
self.status = result_string
|
||||
return Message(text=result_string)
|
||||
return data_to_dataframe(data)
|
||||
|
|
@ -13,9 +13,6 @@ from .python_repl_core import PythonREPLComponent
|
|||
from .search_api import SearchAPIComponent
|
||||
from .searxng import SearXNGToolComponent
|
||||
from .serp_api import SerpAPIComponent
|
||||
from .tavily_extract import TavilyExtractComponent
|
||||
from .tavily_search import TavilySearchComponent
|
||||
from .tavily_search_tool import TavilySearchToolComponent
|
||||
from .wikidata_api import WikidataAPIComponent
|
||||
from .wikipedia_api import WikipediaAPIComponent
|
||||
from .yahoo_finance import YfinanceToolComponent
|
||||
|
|
@ -40,9 +37,6 @@ __all__ = [
|
|||
"SearXNGToolComponent",
|
||||
"SearchAPIComponent",
|
||||
"SerpAPIComponent",
|
||||
"TavilyExtractComponent",
|
||||
"TavilySearchComponent",
|
||||
"TavilySearchToolComponent",
|
||||
"WikidataAPIComponent",
|
||||
"WikipediaAPIComponent",
|
||||
"YfinanceToolComponent",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -272,6 +272,7 @@ export const SIDEBAR_BUNDLES = [
|
|||
icon: "HomeAssistant",
|
||||
},
|
||||
{ display_name: "Search", name: "search", icon: "Search" },
|
||||
{ display_name: "Tavily", name: "tavily", icon: "TavilyIcon" },
|
||||
];
|
||||
|
||||
export const categoryIcons: Record<string, string> = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue