Commit graph

14,415 commits

Author SHA1 Message Date
Eric Hare
4ee53f2ea1
FIX: return all attributes in wikidata (#4786) 2024-11-22 17:35:26 +00:00
Gabriel Luiz Freitas Almeida
a06f777f9c
docs: add documentation for external database configuration (#4707)
* Add documentation for configuring external databases with Langflow

* Update title in configuration documentation to 'External Database Configuration'

* Update PostgreSQL configuration docs to include .env file usage instructions

* more-context

* fix: improve clarity in instructions for starting services in custom database configuration

---------

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2024-11-22 17:17:35 +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
Cristhian Zanforlin Lousa
5ed32cb573
feat: Add PlaygroundButton component to flow toolbar (#4712)
*  (playground-button.tsx): Add a new PlaygroundButton component to the flowToolbarComponent to handle the display of the Playground button based on the presence of Chat Input or Chat Output components.
📝 (index.tsx): Import and use the PlaygroundButton component in the FlowToolbar component to replace the previous implementation of the Playground button display.
🔧 (applies.css): Add styling for the playground-btn-flow-toolbar class to ensure consistent styling for the Playground button in the toolbar.

* 📝 (playground-button.tsx): update import path for IOModal to point to the newModal file instead of the old one
2024-11-22 15:30:38 +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
anovazzi1
efca9f9aeb
refactor: Improve componentHoverAdd.spec test (#4608) 2024-11-22 00:14:45 -03: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
anovazzi1
20f26a9ccf
fix: Improve waiting logic in tweksTest.spec.ts (#4674)
Improve the waiting logic in the tweksTest.spec.ts file to ensure that the necessary elements are loaded before interacting with them. This includes using the waitForSelector function with appropriate timeouts for the modal and popover elements.
2024-11-22 02:03:51 +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
Lucas Oliveira
b1a552fa9e
fix: refactor get all to fix types not being fetched before checking for outdated components (#4762)
* Added use get types to fetch types from backend using tanstack

* Updated typesStore to use new set types

* Updated project to not use getTypes anymore

* deleted unused getTypes

* add tests

* [autofix.ci] apply automated fixes

* fix tests

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-11-21 17:01:37 -08:00
Cristhian Zanforlin Lousa
226453a606
refactor: Replace InputComponent with Select dropdown (#4719)
* 🔧 (nodeToolbarComponent/index.tsx): improve positioning logic for node toolbar based on scale and tool mode to enhance user experience

*  (GlobalVariableModal.tsx): Refactor type selection in GlobalVariableModal to use a dropdown select component for better user experience and consistency.

* Revert "🔧 (nodeToolbarComponent/index.tsx): improve positioning logic for node toolbar based on scale and tool mode to enhance user experience"

This reverts commit 322ba353a6984fcf870cba8c82c26689381842da.

*  (GlobalVariableModal.tsx): Add data-testid attribute to SelectTrigger for testing purposes
🔧 (globalVariables.spec.ts, userSettings.spec.ts): Update test scripts to interact with the SelectTrigger using data-testid attribute for consistency and improved testing accuracy

* 📝 (userSettings.spec.ts): remove commented out code for focusElementsOnBoard function to improve code readability and maintainability
2024-11-21 16:45:01 -08:00
Cristhian Zanforlin Lousa
76890822b6
chore: remove legacy component checks and alerts (#4757)
📝 (PageComponent/index.tsx): Remove redundant useEffect hook that sets notice data for old components
📝 (flowStore.ts): Remove unnecessary check for old components in selection nodes in useFlowStore function
2024-11-21 16:44:44 -08: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
Lucas Oliveira
725a256285
fix: remove useSidebar to fix errors of SidebarWrapper when opening playground page (#4767)
* Added open to data of wrapper

* Fix PageComponent and Header to not use useSidebar anymore
2024-11-21 16:43:58 -08:00
Lucas Oliveira
69465368c1
fix: update edge z index when node is selected (#4765)
Fixed edges zindex when node selected
2024-11-21 16:43:40 -08:00
anovazzi1
6737368073
fix: Improve wait time in saveComponents.spec.ts (#4673)
Improve the wait time in the saveComponents.spec.ts file to ensure that the necessary elements are loaded before interacting with them. This helps prevent potential errors and improves the reliability of the test.
2024-11-21 16:40:39 -08:00
Lucas Oliveira
e5f73c5080
fix: update design of update component (#4761)
* Added warning color

* Implemented more colors

* Implemented warning button variant

* Added warning section to node

* Removed warning button and added warning outline to outdated components

* Added negative margin top to node for it to not move when updatable

* Fixed border to be consistent

* removed unused code

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-21 16:40:25 -08:00
Lucas Oliveira
f0febbcd40
fix: changed tooltip position on playground to improve visibility, fixed color of theme switcher on light mode (#4766)
* Implemented avoidCollisions on ShadTooltip

* Added type for avoidCollisions

* Changed tooltip position for buttons on IOModal

* Fix color of light theme switcher
2024-11-21 16:40:07 -08:00
Cristhian Zanforlin Lousa
3160c54102
fix: conditionally enable useGetFoldersQuery in AppInitPage after initial fetch (#4773)
 (AppInitPage/index.tsx): add support for refetching folders data when isFetched is true to keep data up to date
2024-11-21 21:31:19 +00: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
anovazzi1
8ebe1086d2
refactor: improve freeze-path.spec.ts and freeze.spec.ts files (#4618)
* refactor: Improve time and use waitForSelector in freeze-path.spec.ts

* refactor: Improve time and use waitForSelector in freeze-path.spec.ts

* fromat code

* Refactor freeze.spec.ts: Remove unnecessary code
2024-11-21 16:46:44 -03:00
anovazzi1
d0c3ed165e
docs: update guide for chat memory (#4703)
docs: Update guide for chat memory

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2024-11-21 18:59:29 +00:00
anovazzi1
13f79e58b4
docs: Update documentation for new playground in workspace overview (#4726)
* update docs to fit new playground
---------

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2024-11-21 18:56:38 +00:00
anovazzi1
674e7243c8
docs: update playground docs (#4704)
* fix: update playground docs

---------

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2024-11-21 18:48:45 +00:00
Lucas Oliveira
c08d237e14
fix: changed width of sidebar to be consistent across application (#4759)
Changed width of sidebar to be 280
2024-11-21 09:45:34 -08: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
12407f00af
fix: Indent JSON output for exported flow data (#4750)
Indent JSON output for exported flow data in reactflowUtils.ts
2024-11-21 09:27:24 -08:00
Sebastián Estévez
4f27dbd918
chore: speed up whl install in cli tests with uv (#4764)
uv for whl install
2024-11-21 17:19:18 +00: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
anovazzi1
105e52f6eb
docs: update Message object in guides-data-message.md (#4727)
* refactor: Improve structure and attributes of Message object in guides-data-message.md


Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2024-11-21 14:04:45 +00:00
Mendon Kissling
3e57340cc4
Fix: simple agent template notes (#4709)
* delete-youtube-template

* update-simple-agent

* update-description

* docs-package-and-yarn-lock

* update-edges

* descriptions-and-markdown

* readme

* tags

* update

hotfix for the tool_kit mode component update

* Update Simple Agent.json

added project tags

* Update Simple Agent.spec.ts

Playwright test update

* Update Simple Agent.spec.ts

* Update starter-projects.spec.ts

remove  youtube flow  from templates in test

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2024-11-20 15:24:37 -05:00
Vinícios Batista da Silva
32554b4b93
docs: add google integration (#4382)
* docs: Add Google OAuth Integrations Docs

- Added documentation teaching how to configure an application using Google's OAuth API to use the components present in Langflow. Example: (Google Drive Loader, Google Drive Search and Gmail Loader).

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* docs: Updated the json available for download with the example flow

- Updated the json available for download with the example flow for using OAuth permissions in Langflow.
- Modified the existing Google Oauth Token component in Flow, with corrections and updates from component.

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* cleanup-style

* url

* docs: Add Google OAuth Integrations Docs

- Added documentation teaching how to configure an application using Google's OAuth API to use the components present in Langflow. Example: (Google Drive Loader, Google Drive Search and Gmail Loader).

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* docs: Updated the json available for download with the example flow

- Updated the json available for download with the example flow for using OAuth permissions in Langflow.
- Modified the existing Google Oauth Token component in Flow, with corrections and updates from component.

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* cleanup-style

* url

* fix: Updated Google Oauth Token component in flow example
- The component code has been updated to resolve lint issues and improve performance as per commit example:
    https://github.com/langflow-ai/langflow/pull/4383/commits/4df070f6e23a323114930e3e1dce500df7368353

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* docs: apply reviewer’s suggestions for documentation clarity

- Corrected grammar and improved readability as per GitHub review feedback

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* update-gif-new-workflow

* style-and-test

* Apply suggestions from code review

Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>

---------

Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
2024-11-20 14:42:41 -05:00
Mendon Kissling
3fd4a61310
docs: Update agent tool documentation and enhance flow as tool component (#4636)
* docs: Update agent tool documentation and enhance flow as tool component details

* docs: Update component terminology for consistency and improve section title

* chore: add lucide-react dependency to package-lock and yarn.lock
2024-11-20 14:21:44 -05:00
Deon Sanchez
d5010c5d0b
refactor: Improve GitHub link styling in AppHeader component (#4737) 2024-11-20 10:04:54 -07:00
anovazzi1
9ceb18ad4f
fix: reset tool mode after update component code (#4723)
fix bug related to tool mode
2024-11-19 23:28:00 +00:00
Gabriel Luiz Freitas Almeida
a0acf39f8a
feat: Add database cleanup functions for transactions and vertex builds (#4694)
* feat: Add configuration options for maximum transactions and vertex builds retention

* Add functions to clean up old transactions and vertex builds in the database

- Implement `clean_transactions` to delete transactions exceeding the configured limit.
- Implement `clean_vertex_builds` to delete vertex builds exceeding the configured limit.
- Integrate cleanup functions into the service initialization process.

* Add error handling and logging for cleanup tasks in utils.py

- Wrap transaction and vertex build cleanup operations in try-except blocks.
- Log success and error messages for cleanup operations.
- Rollback session on exceptions without re-raising, as these are cleanup tasks.
- Adjust service initialization order to ensure proper setup.

* Reorder setup and cleanup tasks in database initialization process

* fix: Update type hints for settings_service in cleanup functions

* Remove execution options in cleanup functions

* Handle specific exceptions during cleanup tasks in utils.py

* Use `col` for column references in delete statements to improve SQL query clarity.
2024-11-19 15:16:36 -08:00
anovazzi1
ebe4f3470c
refactor: Improve time and use waitForSelector in globalVariables.spec.ts (#4619) 2024-11-19 14:04:08 -08:00
Ítalo Johnny
b978241d16
fix: assign orphaned flows to superuser if auto-login is enabled (#4715)
* fix: assign orphaned flows to superuser if auto-login is enabled

* fix: orphan flow naming

* fix: ruff errors

* fix: orphan flow naming (again)
2024-11-19 13:55:07 -08:00
Lucas Oliveira
c9e0d5e4ba
fix: updated node toolbar to be more stable on zoom, fix success and error component tooltips, unselect nodes on flow opening (#4610)
* Unselect nodes and edges on enter

* Start with viewport fit

* Fix run component tooltip to match error and success

* Update scrollbar design

* Added node toolbar without portal to match the width of the node

* Updated color of scrollbar

* Updated NoteNode to have same behavior as GenericNode

* Updated logic for tests to pass

* Fix fitview to only occur when nodes are present

* Update z index of resize handle

* Sticky notes test fix

* [autofix.ci] apply automated fixes

* freeze test fixed

---------

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
2024-11-19 13:54:49 -08:00
Gabriel Luiz Freitas Almeida
ffd9eaae9f
fix: update Test Docker Images workflow to use get_version_info (#4721)
Update Docker test workflow to use get_version_info function for version retrieval
2024-11-19 21:48:37 +00:00
anovazzi1
39cec36641
fix: fix overflow for lists in markdown render (#4720)
* feat: Add support for ordered and unordered lists in ContentDisplay and ChatMessage components to prevent overflow
2024-11-19 21:28:39 +00:00
Junxi (Eric) Li
f1c00750aa
fix: correct issue with Milvus field name, renamed connection password to Token (#4453)
rename connectino password to Token
2024-11-19 12:10:39 -08:00
Jordan Frazier
e7e364eb0d
chore: add deprecation flag on base upload flow route (#4717)
* add deprecation flag on base upload flow route

* add deprecation flag on base upload flow route

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-19 12:05:23 -08:00
Gabriel Luiz Freitas Almeida
fb83af224a
chore: Add pyproject.toml configuration to ruff format command in Makefile (#4714)
* Add pyproject.toml config flag to ruff commands in Makefile

* Update ruff exclude path in pyproject.toml

* Remove unused TYPE_CHECKING import from api_key.py

* Remove redundant config flag from 'ruff check' command in Makefile
2024-11-19 19:06:01 +00:00
Cristhian Zanforlin Lousa
9e8715cf4c
fix: enhance folder download endpoint with zip file support (#4706)
* expanding download folder to zip file

* run formatter

* Update src/backend/base/langflow/api/v1/folders.py

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

* changing model to flowRead

* run formatter

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-11-19 18:41:37 +00:00
Gabriel Luiz Freitas Almeida
25a0d7674a
fix: update import for compatibility, format starter projects, fix coroutine call (#4708)
* Use `typing_extensions.override` for compatibility with older Python versions

* Format starter projects

* Fix async call in get_lf_version_from_pypi by adding 'await'
2024-11-19 18:17:32 +00:00
Christophe Bornet
1b39ce6f6e
ref: Make check_langflow_version async (#4701)
Make check_langflow_version async
2024-11-19 15:33:55 +00:00