Commit graph

6,115 commits

Author SHA1 Message Date
Eric Hare
6902f1611d
fix: Successfully return agents in the Sequential Crew Component (#4899)
* fix: return the agents list in the crew code

* fix: return the agents list in the crew code

* Update crew.py
2024-11-27 13:29:18 -08:00
Gabriel Luiz Freitas Almeida
e6ebe7e206
feat: Add DataFrameInput and refactor DataSet references (#4898)
* refactor: rename DataSet to DataFrame

* feat: add DataFrameInput type and update InputTypes definition

* feat: add DataFrame type to CUSTOM_COMPONENT_SUPPORTED_TYPES

* refactor: replace DataSet with DataFrame in schema and tests
2024-11-27 21:14:04 +00:00
Christophe Bornet
eb46bd4606
fix: Fix get_default_folder_id (#4893)
Fix get_default_folder_id
2024-11-27 12:41:28 -08:00
TarunAdvaithK
2a434f6844
feat: Add combinatorial reasoning as a component (#4782)
* Add Icosa's Combinatorial Reasoner as component under tools

* Remove temporary testing tool revert unit test script

* reverting changes to locks

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Moved combinatorial reasoner component to separate icosacomputing folder for Icosa's bundle

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-27 09:28:22 -08:00
Cezar Vasconcelos
4c35e0567a
fix: add missing component URLs in Component Maker (#4820)
* fix: missing component URLs

* add tags, gradient and icon to Custom Component Maker template

* Add descriptive error messages to project data assertions

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-11-27 15:13:15 +00:00
Thomas Kraxner
1e6ada3a3a
feat: make log format configurable (#4851)
* made logformat configurable

* [autofix.ci] apply automated fixes

* documentation of log format env var

* log stuff at one place in documentation

* added documentation of log environment

* check for log format

* [autofix.ci] apply automated fixes

* just load log format on custom logenv

* [autofix.ci] apply automated fixes

* no more invalid whitespaces

* fixed br s with escape

* logging error in case of invalid format string

---------

Co-authored-by: Kraxner Thomas <thomas.kraxner@illwerkevkw.at>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-27 06:28:50 -08:00
Phil Miesle
2de119b8d5
feat: defaulting tool description to the flow description in Flow as Tool (#4873)
defaulting tool description to the flow description
2024-11-27 00:48:21 +00:00
Gabriel Luiz Freitas Almeida
7e88a4760b
feat: add easier initialization to DataSet (#4864)
* feat: enhance DataSet class with improved constructor and methods for better data handling

- Added custom constructor to support various input formats including lists of Data objects, dictionaries, and existing DataFrames.
- Introduced methods `add_row` and `add_rows` for adding single or multiple rows to the DataSet.
- Updated docstrings and examples for clarity and usability.
- Ensured compatibility with pandas DataFrame operations while preserving Data object structures.

* test: add comprehensive tests for DataSet initialization and row operations

* feat: add DataSet class to schema module

* refactor: simplify DataSet initialization and improve data validation
2024-11-27 00:01:08 +00:00
Cristhian Zanforlin Lousa
159f6e5906
fix: enable database loading for OpenAI API base URL in Instagram Copywriter (#4843)
* 🐛 (Instagram Copywriter.json): fix load_from_db field to be set to true instead of false to correctly load data from the database.

* 🐛 (setup.py): Fix condition to update component versions by excluding "load_from_db" attribute
🐛 (Instagram Copywriter.json): Fix incorrect "load_from_db" value for "api_key" and "openai_api_base" properties
2024-11-26 23:32:34 +00:00
Ítalo Johnny
cf30b88a91
fix: node display_name updates and display for users (#4875) 2024-11-26 21:58:06 +00:00
anovazzi1
907d9929e4
Fix: prevent infinity bug on agent (#4876)
* Fix error handling and logging in build_flow function

* Refactor: Update serialize_field function in utils.py

This commit refactors the serialize_field function in utils.py to handle additional data types. It now properly serializes BaseModel objects and dictionaries by recursively calling the serialize_field function on their values. Additionally, it ensures that all other data types are converted to strings before returning.

#4873

* update serialize
2024-11-26 21:48:00 +00:00
Gabriel Luiz Freitas Almeida
77289793c5
fix: handle different output formats in agent message processing (#4867)
* fix: handle different output formats in agent message processing

* fix: correct condition for handling Anthropic message output

* refactor: extract text output handling into separate function
2024-11-26 21:43:46 +00:00
Gabriel Luiz Freitas Almeida
1a057571c9
feat: introduces DataSet class to improve the experience with lists of Data (#4834)
* Add DataSet class to handle conversion between Data objects and DataFrame

* feat: enhance DataSet class with detailed docstrings and examples for better usability

* feat: add custom constructor property to DataSet for improved DataFrame compatibility

* test: add unit tests for DataSet class methods and functionality
2024-11-26 05:04:44 -08:00
Phil Miesle
97fe69c12c
Expanding Unstructured loader to take server file inputs, more file types, and API parameters (#4738)
* adding ability for APIRequest to retry and save to a file

* [autofix.ci] apply automated fixes

* adding ability for APIRequest to retry and save to a file

* [autofix.ci] apply automated fixes

* initial refactor of FileComponent to handle Data input

* shifting potentially common logic into BaseFileComponent

* improving readability and fixing problems

* [autofix.ci] apply automated fixes

* addressing linting

* [autofix.ci] apply automated fixes

* linting part 2

* [autofix.ci] apply automated fixes

* linting part 3

* preserve input fields on data objects

* [autofix.ci] apply automated fixes

* ensuring processed data is linked to correct file data object

* [autofix.ci] apply automated fixes

* addressing linting

* [autofix.ci] apply automated fixes

* refactor Unstructured to BaseFileComponent

* [autofix.ci] apply automated fixes

* linting

* refactor to new BaseData

* adding chunking strategy selector

* [autofix.ci] apply automated fixes

* fixing edge case

* allowing specific failure of missing file without forcing silent_errors

* [autofix.ci] apply automated fixes

* Fix mypy issues

* Update unstructured.py

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-11-25 21:07:25 -08:00
Phil Miesle
8e55a0e5f4
feat: new AlterMetadataComponent enhances Data and Message objects with dict or Data object entries (#4634)
* creating AddMetadataComponent

* [autofix.ci] apply automated fixes

* fixing lint

* allow removal of metadata fields

* [autofix.ci] apply automated fixes

* Fix the name of alter metadata

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-11-25 20:48:45 -08:00
Phil Miesle
e439d71bfa
feat: adding list of Data output to Parse Data (#4598)
* adding list of Data output to Parse Data

* [autofix.ci] apply automated fixes

* enabling connection from more List outputs

* [autofix.ci] apply automated fixes

* refactor to have single return type

* [autofix.ci] apply automated fixes

* addressing linting comments

* [autofix.ci] apply automated fixes

* apparently lint was missed...

* sigh

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-11-25 20:40:59 -08:00
Phil Miesle
c6f27b5af8
Creating BaseFileComponent, integrating with API Request "to file" feature (#4731)
* adding ability for APIRequest to retry and save to a file

* [autofix.ci] apply automated fixes

* adding ability for APIRequest to retry and save to a file

* [autofix.ci] apply automated fixes

* initial refactor of FileComponent to handle Data input

* shifting potentially common logic into BaseFileComponent

* improving readability and fixing problems

* [autofix.ci] apply automated fixes

* addressing linting

* [autofix.ci] apply automated fixes

* linting part 2

* [autofix.ci] apply automated fixes

* linting part 3

* preserve input fields on data objects

* [autofix.ci] apply automated fixes

* ensuring processed data is linked to correct file data object

* [autofix.ci] apply automated fixes

* addressing linting

* [autofix.ci] apply automated fixes

* fixing edge case

* allowing specific failure of missing file without forcing silent_errors

* Base_file mypy errors

* [autofix.ci] apply automated fixes

* Update base_file.py

* Update base_file.py

* Fix starter templates

* Update test_vector_store_rag.py

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-11-25 20:36:17 -08:00
Phil Miesle
654b44347b
adding ability for APIRequest to retry and save to a file (#4677)
* re-adding ability for APIRequest to retry and save to a file

* [autofix.ci] apply automated fixes

* enabling selective inclusion of httpx headers, along with response header

* [autofix.ci] apply automated fixes

* Update api_request.py

* [autofix.ci] apply automated fixes

* Update test_data_components.py

* Update test_data_components.py

* [autofix.ci] apply automated fixes

* Update api_request.py

* Update api_request.py

* Update api_request.py

* Update api_request.py

* Update api_request.py

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-11-25 19:58:48 -08:00
Ítalo Johnny
3c83e153ec
chore: remove unused plugin-related code (#4826)
chore: refactor: remove unused plugin-related code
2024-11-26 00:43:40 +00:00
Christophe Bornet
1962e48266
ref: Remove usage of deprecated get_event_loop (#4697)
Remove usage of deprecated get_event_loop
2024-11-26 00:17:29 +00:00
Christophe Bornet
1ba2e0e71b
ref: Add aiofile to do async file operations (#4705)
Add aiofile to do async file operations
2024-11-25 23:50:25 +00:00
Christophe Bornet
598e6bc5ae
ref: Apply ruff rules preview autofix (#4699)
Apply ruff rules preview autofix
2024-11-25 23:42:38 +00:00
Csongor Barabasi
394cc55ab7
fix: Expose chosen model by NotDiamond router (#4833)
* Show the chosen model on the NotDiamond component

* Formatting and linting
2024-11-25 12:23:42 -08:00
Ítalo Johnny
9b50b81e7d
chore: set log level to debug (#4830) 2024-11-25 11:25:43 -08:00
Gabriel Luiz Freitas Almeida
091944095f
chore: Bump package versions for langflow and langflow-base (#4816)
fix: bump package versions to 1.1.1 and 0.1.1 for langflow and langflow-base
2024-11-25 16:14:39 +00:00
Mendon Kissling
aa73e6f19c
fix: swap descriptions for Load Data Flow and Retriever Flow in template (#4814)
fix: swap descriptions for Load Data Flow and Retriever Flow in JSON configuration
2024-11-25 15:24:59 +00:00
Ítalo Johnny
450b371566
fix: raise ImportError instead of silencing AttributeError (#4812)
* fix: raise ImportError instead of silencing AttributeError

* chore: add Message class to init for import standardization

* feat: add exception message pattern check for import errors

* refactor: simplify code
2024-11-25 14:14:57 +00:00
Gabriel Luiz Freitas Almeida
bd15071b33
refactor: updates import statements to use Pydantic in aiml_embeddings.py (#4801)
Fix import statements for Pydantic in aiml_embeddings.py
2024-11-24 09:25:36 +01:00
Karan Vaidya
3e1b22b23f
feat: improve composio oauth experience (#4613) 2024-11-23 15:23:57 +00:00
Christophe Bornet
ab63ddddbd
ref: Use blockbuster package (#4777)
* Use blockbuster package

* Upgrade blockbuster to v1.1
2024-11-23 15:05:56 +00:00
Gabriel Luiz Freitas Almeida
e61fb96504
refactor: Improve error messaging for missing message fields in memory module (#4779)
* Improve error messaging for missing message fields in memory module

* fix: Simplify return statement in NotDiamondComponent's chat result method

* Update .gitignore to exclude all .db files
2024-11-23 13:04:20 +00:00
Csongor Barabasi
ef2199b317
feat: LLM routing integration via NotDiamond (#4543)
* WIP

* Integrate Notdiamond via API call

* Fix frontend lock

* Update

* Update ND integration to use HandleInput for LLM models

* Move NotDiamond out into bundles and add fallback call

* Update src/backend/base/langflow/components/notdiamond/notdiamond.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* Update src/backend/base/langflow/components/notdiamond/notdiamond.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* Update src/frontend/src/icons/NotDiamond/NotDiamondIcon.jsx

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-11-23 12:20:53 +00:00
Gabriel Luiz Freitas Almeida
4620669129
fix: Fix flow addition to session and handle IntegrityError for orphaned flows (#4799)
* Handle IntegrityError specifically when assigning orphaned flows to superuser

* Add missing session.add(flow) to ensure flow is added to the session before commit
2024-11-22 14:05:28 -08:00
Cristhian Zanforlin Lousa
214d5a9f07
feat: add icons to API components and update Python icon SVG (#4794)
* add icons: wikipedia, serpapi, searchapi, glean, python, bing

* update glean icon

* formatting files

*  (create_data.py): add an icon attribute with the value "ListFilter" to improve visual representation of the component
📝 (python_code_structured_tool.py): update the icon attribute value from "🐍" to "Python" for better clarity and consistency

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-11-22 13:13:13 -08:00
Sebastián Estévez
061971f913
chore: Tighten up dependencies (#4792)
* take 1 WIP

* remove firecrawl dep from langflow package, only usage appears to be in langflow-base

* langchain-google-genai to 2.0.1 which is what we have now in the lock file

* widen ranges based on old lock file

* lock
2024-11-22 11:37:17 -08:00
Edwin Jose
230a01973e
fix: validation for tool name (#4790)
validation for tool name

Tool name validation based on open ai Schema for tool names
2024-11-22 18:56:31 +00:00
Phil Miesle
08849b6bab
feat: adds LangChain Fake Embeddings (#4789)
adding LangChain Fake Embeddings

Co-authored-by: Eric Hare <ericrhare@gmail.com>
2024-11-22 18:05:40 +00:00
Phil Miesle
68a0b7d6c6
fix: handle Message in path input in CSVAgentComponent (#4784)
* fixing problem handling path type

* Add type check for 'path.text' in CSV utility function

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-11-22 17:51:39 +00:00
Eric Hare
4ee53f2ea1
FIX: return all attributes in wikidata (#4786) 2024-11-22 17:35:26 +00:00
Edwin Jose
b3b2b2572a
fix: fixes Ollama Embeddings component (#4787)
Update ollama.py

removed unwanted parameter temperature for embedding
2024-11-22 17:10:09 +00:00
anovazzi1
e208776ea2
feat: Add FolderSync icon to UpdateDataComponent in update_data.py (#4753)
* refactor: Add FolderSync icon to nodeIconsLucide in styleUtils.ts

* feat: Add FolderSync icon to UpdateDataComponent in update_data.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-22 05:37:50 -08:00
Cristhian Zanforlin Lousa
d31fa35586
feat: add Google icons to search-related components (#4760)
 (google_search_api.py): Add icon property to GoogleSearchAPIComponent for better visualization in the UI
 (google_serper_api.py): Add icon property to GoogleSerperAPIComponent for better visualization in the UI
📝 (styleUtils.ts): Add GoogleSearchAPI and GoogleSerperAPI icons to nodeIconsLucide for consistent styling in the frontend.
2024-11-22 09:34:00 -03:00
Cristhian Zanforlin Lousa
13321a3635
feat: rename MetaphorToolkit file to ExaSearchToolkit and update component icons (#4754) 2024-11-22 03:31:27 +00:00
Samuel Matioli
84fa2fcc2f
fix(astradb_tools): sets some options as Advanced and improves descriptions (#4732)
Setting some options as Advanced
2024-11-22 02:25:18 +00:00
Rogério Chaves
1532da59f5
fix: traces inputs and outputs not being sent to tracing services (#4669)
* Fix node inputs not being captured, add runtime inputs as well to be captured by the tracers properly

* Fix outputs missing on traces due to them being reset before ending the traces because of race conditions

* Fallback to project name if none

* Remove 'dynamic inputs' to stop sending the component code every time

* fix: Add async flow name retrieval in graph building process

* fix: Retrieve flow name from database when building graph from data

* Fix: make session.exec call awaitable in chat API

* Refactor `_get_flow_name` to manage session internally

* Refactor session handling to use `async_session_scope` in chat API

* Refactor test cases to remove unnecessary async usage in mock functions

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-22 01:41:39 +00:00
Edwin Jose
8fb19add81
fix: Error in SerpAPI search: cannot access local variable 'wrapper' where it is not associated with a value (#4758)
Update serp_api.py

fixes:  Error: Error in SerpAPI search: cannot access local variable 'wrapper' where it is not associated with a value
2024-11-21 16:44:14 -08:00
Gabriel Luiz Freitas Almeida
6fe7a58c8d
fix: Add validation for MessageBase type in message input conversion (#4769)
Add validation for MessageBase type in message input conversion
2024-11-21 20:21:33 +00:00
Ítalo Johnny
e728e40561
fix: ensure unique flow names when assigning to superuser and avoid adding starter projects (#4751)
* fix: ensure unique flow names when assigning to superuser

* refactor: Creates a new function with logic to rename flows

* refactor: simplify function

* Extract STARTER_FOLDER constants to a separate module

* Filter orphaned flows by excluding those in the starter folder

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-11-21 09:35:32 -08:00
Gabriel Luiz Freitas Almeida
be7eac9e00
fix: Gracefully handle missing imports for model components (#4743)
* Handle ImportError for langchain_groq in Groq model initialization

* Refactor model input constants to handle missing imports gracefully

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-21 16:41:01 +00:00
Gabriel Luiz Freitas Almeida
9450f8529a
fix: Update dependency versions for pydantic to fix sqlmodel conflict (#4755)
Update dependency versions for pydantic in pyproject.toml
2024-11-21 16:01:14 +00:00