Commit graph

13,304 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
b23e17e54a
refactor: update tools output type to Tool (#2766)
* refactor: update tools output type to Tool

* refactor: Update BingSearchAPI to return Tool type
2024-07-17 19:32:52 +00:00
anovazzi1
6e75a05978
feat: Add authentication store and create useLogoutHook (#2763)
* feat: add authentication store and create useLogoutHook

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com>
2024-07-17 19:02:19 +00:00
Daniel Gines
114cdb9ac6
feat: Add new Atlassian Confluence Component for document loading and vector database integration (#2718)
* feat: Add Gemma 2 to Groq model list (#2586)

Add gemma2 to groq_constants.py

* Adds new ConfluenceComponent module with lazy loading support

- Implements ConfluenceComponent to load documents from the Confluence platform.
- Adds necessary inputs, including URL, username, API key, space_key, and more.
- Supports configuration of max_pages for pagination control.
- Implements lazy loading in the load_documents method for incremental document processing.
- Allows immediate processing of documents as they are loaded.

This new module facilitates integration with the Confluence platform and enables efficient handling of large volumes of data.

* Adds new ConfluenceComponent module

- Implements ConfluenceComponent to load documents from the Confluence platform.
- Adds necessary inputs, including URL, username, API key, space key, and more.
- Supports configuration of max_pages for pagination control.

This new module facilitates integration with the Confluence platform.

* Updated load_documents method to use Data.from_document

- Changed load_documents method to convert documents using Data..from_document instead of docs_to_data for better integration with Data module.
- Updated trace_type to "tool" because the LangSmith API only supports one of the following types: ["tool", "chain", "llm", "retriever", "embedding", "prompt", "parser"].

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Gordon Stein <7331488+gsteinLTU@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-17 17:48:56 +00:00
Nicolò Boschi
b281a7d25e
feat: migrate Search APIs to Component syntax (#2637)
* feat: migrate bingsearch to Component syntax

* all

* fix style

* [autofix.ci] apply automated fixes

* feat: Update BingSearchAPI and WikipediaAPI components

Refactor the BingSearchAPI and WikipediaAPI components to improve code organization and readability. Migrate BingSearchAPI to Component syntax and make initialization separate from the constructor. Update the condition to run end_all_traces in the BingSearchAPIComponent. Also, update the WikipediaAPIComponent to use the WikipediaAPIWrapper with the specified parameters.

* update lock

---------

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-07-17 17:41:03 +00:00
Gabriel Luiz Freitas Almeida
e7c4474e07
ci: add auto_merge_enabled to pull_request types in ci.yml (#2762)
ci.yml: add pull_request types for auto_merge_enabled
2024-07-17 14:27:12 -03:00
Daniel Gines
8980538879
feat: Improvements to Makefile: Directory Cleanup and Descriptive Comments (#2745)
Updates and changes to the Makefile:

1. Added removal of `frontend` directory inside `src/backend/base/langflow/` and `build` directory inside `src/frontend/` to the `clean_npm_cache` target.
2. Added descriptive comments for the `build_and_install`, `build_and_run`, `fix_codespell`, `setup_poetry`, `unit_tests`, `integration_tests`, and `tests_frontend` targets.

Looking forward to your feedback.
2024-07-17 13:59:06 -03:00
Gabriel Luiz Freitas Almeida
c15e8ace8a
ci: update conditions at which CI runs (#2761)
* ci(conventional-labels.yml): update pull_request_target event types to remove unnecessary spaces and adjust pull_request_review event types to only trigger on submitted actions

* feat: add condition to run path-filter job only if PR is approved, manual run, or not a draft PR
2024-07-17 16:56:28 +00:00
Gabriel Luiz Freitas Almeida
50a64b0e0e
feat: Add YFinanceTool component for interacting with Yahoo Finance News (#2759)
* feat: add yfinance dependency to pyproject.toml

* feat: Add YFinanceTool component for interacting with Yahoo Finance News

* refactor: update YfinanceToolComponent to use type casting for Tool return value
2024-07-17 16:18:00 +00:00
Rodrigo Nader
d509c0a998
Update README.md 2024-07-17 13:15:47 -03:00
Gabriel Luiz Freitas Almeida
865d3adf3e
feat: add astra_assistants color to nodeColors and nodeNames (#2743)
Add a new color and name for the "astra_assistants" node in the styleUtils.ts file.
2024-07-17 12:59:03 -03:00
Gabriel Luiz Freitas Almeida
5f18baadb5
feat: add two new starter projects (#2758)
* feat: add sequential agent starter project

* feat: add hierarchical agent starter project

* update example

* refactor: update newFlowModal examples for Sequential Agent, Hierarchical Agent, and Complex Agent
2024-07-17 08:48:35 -07:00
Gabriel Luiz Freitas Almeida
b2ad14e6a9
fix(crewai): replace MessageTextInput with MultilineInput (#2757)
* feat: Update input handling in HierarchicalTaskComponent

The code changes modify the `HierarchicalTaskComponent` in the `HierarchicalTask.py` file. The `MessageTextInput` inputs are replaced with `MultilineInput` inputs to allow for multiline descriptions and expected outputs. This change improves the user experience and provides more flexibility in input handling.

* refactor: Update input handling in SequentialTaskComponent

The code changes modify the `SequentialTaskComponent` in the `SequentialTask.py` file. The `MessageTextInput` inputs are replaced with `MultilineInput` inputs to allow for multiline descriptions and expected outputs. This change improves the user experience and provides more flexibility in input handling.

* refactor: Update input handling in CrewAIAgentComponent

The code changes modify the `CrewAIAgentComponent` in the `CrewAIAgent.py` file. The `MessageTextInput` inputs are replaced with `MultilineInput` inputs to allow for multiline descriptions and expected outputs. This change improves the user experience and provides more flexibility in input handling.
2024-07-17 14:48:15 +00:00
Gabriel Luiz Freitas Almeida
51af9639f7
feat: Add newFlowModal examples for Sequential Agent, Hierarchical Agent, and Complex Agent (#2756)
This commit adds new examples to the newFlowModal component for Sequential Agent, Hierarchical Agent, and Complex Agent. Each example is rendered as an UndrawCardComponent with the corresponding flow data. This enhancement provides users with more options when creating new flows.
2024-07-17 11:27:00 -03:00
anovazzi1
13fe129e4b
refactor: add queries and mutation for authentication refactor (#2754)
* feat: add API endpoint for retrieving user data

* feat: add useAddUser hook for adding a user via API

* feat: add useGetUserPage hook for retrieving users with pagination

* refactor: optimize deletion of messages (#2714)

* feat: optimize deletion of messages in SessionView component

This commit optimizes the deletion of messages in the SessionView component by using the useDeleteMessages hook from the API queries. It replaces the useRemoveMessages hook that was previously used. The new implementation handles the deletion of messages more efficiently and provides better error handling. The selectedRows state is updated after successful deletion, and a success message is displayed to the user. In case of an error, an error message is shown.

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

* feat: optimize deletion of messages in SessionView component

This commit optimizes the deletion of messages in the SessionView component by using the useDeleteMessages hook from the API queries. It replaces the useRemoveMessages hook that was previously used. The new implementation handles the deletion of messages more efficiently and provides better error handling. The selectedRows state is updated after successful deletion, and a success message is displayed to the user. In case of an error, an error message is shown.

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

* refactor: optimize deletion of messages in SessionView component

This commit optimizes the deletion of messages in the SessionView component by using the useDeleteMessages hook from the API queries. It replaces the useRemoveMessages hook that was previously used. The new implementation handles the deletion of messages more efficiently and provides better error handling. The selectedRows state is updated after successful deletion, and a success message is displayed to the user. In case of an error, an error message is shown.

* [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>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>

* fix: component seems to be clickable (#2731)

* Changed card to not have shadow on hover if it is a component

* removed unused console.log

* feat: add logs field to ResultData and Vertex class (#2732)

* feat: add logs to ResultDataResponse in schemas.py

* feat(schema.py): add logs field to ResultData class to store log messages for better debugging and monitoring

* feat(vertex): add logs attribute to Vertex class to store logs for each vertex operation

* feat: add useDeleteUsers hook for deleting users via API

* feat: add useUpdateUser hook for updating user data via API

* feat: add useResetPassword hook for resetting user password via API

* feat: add logout API endpoint and useLogout hook

Add the `logout` API endpoint and the `useLogout` hook to handle user logout functionality. The `logout` API endpoint sends a PATCH request to the server to log out the user, while the `useLogout` hook provides a convenient way to call the `logout` API endpoint. This addition allows users to securely log out of the application.

* feat: add login API endpoint and useLoginUser hook

Add the `login` API endpoint and the `useLoginUser` hook to handle user login functionality. The `login` API endpoint sends a POST request to the server with the user's username and password to authenticate the user. The `useLoginUser` hook provides a convenient way to call the `login` API endpoint. This addition allows users to securely log in to the application.

* feat: add autologin API endpoint and useGetAutoLogin hook

Add the `autologin` API endpoint and the `useGetAutoLogin` hook to handle automatic login functionality. The `autologin` API endpoint sends a GET request to the server to check if the user is already logged in. The `useGetAutoLogin` hook provides a convenient way to call the `autologin` API endpoint. This addition allows for seamless automatic login for users who have previously logged in to the application.

* feat: add REFRESH constant and useRefrshAccessToken hook

Add the `REFRESH` constant to the `constants.ts` file and the `useRefrshAccessToken` hook to handle refreshing the access token. The `REFRESH` constant represents the API endpoint for refreshing the access token, and the `useRefrshAccessToken` hook provides a convenient way to call this endpoint. This addition allows for seamless token refreshing for authenticated users.

* refactor: fromat code

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
2024-07-17 13:36:48 +00:00
Gabriel Luiz Freitas Almeida
6ef0d0c1f9
feat: add opentelemetry-instrumentation-fastapi dependency (#2751)
Add opentelemetry-instrumentation-fastapi as a dependency in pyproject.toml and poetry.lock files. This dependency is required for instrumenting FastAPI with OpenTelemetry for distributed tracing and monitoring.
2024-07-17 11:59:43 +00:00
Gabriel Luiz Freitas Almeida
7aa4565343
chore(pyproject.toml): update package versions for langflow and langflow-base to 1.0.10 and 0.0.86 respectively (#2746) 2024-07-16 17:59:11 -07:00
Jordan Frazier
ae3439c40b
ci: add astra integration tests to CI (#2643)
* Add astra integration tests to CI

* Add astra integration tests to CI

* revert whitespace changes

* update filter

* Swap to using a scheduled job rather than filter
2024-07-16 17:38:17 -07:00
anovazzi1
23874b81ed
feat: add new freeze function to component (#2624)
* feat: Add new API endpoint for retrieving vertex order

This commit adds a new API endpoint, , which allows for retrieving the order of vertices in a graph. It includes the necessary functions and types to make the API request and process the response. This feature enhances the functionality of the application by providing the ability to retrieve and work with vertex order data.

* feat: Add missing semicolon in constants.ts

The commit adds a missing semicolon in the  file in the  directory. This fix ensures that the code is syntactically correct and prevents any potential issues that may arise from the missing semicolon.

* feat: Refactor usePostRetrieveVertexOrder to improve code readability and maintainability

* feat: Add FreezeAllSvg component for displaying a freeze all icon

This commit adds a new component called FreezeAllSvg, which is responsible for rendering an SVG icon representing the freeze all feature. The component accepts props for customizing the size and color of the icon. This addition enhances the visual representation of the freeze all functionality in the application.

* feat: Add freezeMultipleNodes method to FlowStoreType

This commit adds the `freezeMultipleNodes` method to the `FlowStoreType` interface in the `index.ts` file. The method takes an array of node IDs as input and freezes the corresponding nodes in the flow. This addition enhances the functionality of the flow store by providing the ability to freeze multiple nodes at once.

* feat: Update freezeMultipleNodes to use updateFreezeStatus and updateNodeInternals

Refactor the NodeToolbarComponent to use the updated freezeMultipleNodes method in the FlowStore. Instead of directly freezing the nodes, the method now calls updateFreezeStatus to update the freeze status of the nodes and updateNodeInternals to update the node internals. This change improves the functionality and maintainability of the code.

* feat: Update FreezeAllSvg component to use currentColor for fill

The commit updates the FreezeAllSvg component to use the CSS `currentColor` value for the fill property. This change ensures that the fill color of the SVG icon will match the current text color, providing a consistent and customizable visual representation of the freeze all feature.

* feat: Add freezeAll shortcut and component

This commit adds the `freezeAll` shortcut and component to the application. The `freezeAll` shortcut allows users to freeze all nodes in the flow at once, while the `FreezeAllSvg` component is responsible for rendering an SVG icon representing the freeze all feature. These additions enhance the functionality and user experience of the application by providing a convenient way to freeze multiple nodes and a visual representation of the freeze all feature.

* [autofix.ci] apply automated fixes

* feat: Refactor get_vertex method to include silent parameter

This commit refactors the `get_vertex` method in the `Graph` class to include a `silent` parameter. The `silent` parameter allows the method to be called without raising an exception if the vertex is not found. This change improves the flexibility and usability of the method, as it can now be used in scenarios where the absence of a vertex is expected.

* feat: check if parent vertex is frozen and cache children

* feat: change ungroup_node function to add frozen status to nodes

This commit refactors the `ungroup_node` function in the `utils.py` file to add the `frozen` status to each node in the list of nodes. The `frozen` status is obtained from the `group_node_data` parameter and is assigned to each node in the loop. This change improves the functionality and maintainability of the code by ensuring that the frozen status is correctly applied to the nodes during the ungrouping process.

* Refactor code to check if parent vertex is frozen before caching children

* feat: Rename "Freeze All" to "Freeze Path" in shortcuts and components

This commit updates the codebase to rename the "Freeze All" feature to "Freeze Path" in the shortcuts and components. The changes include modifying the constant name, updating the shortcut key, and adjusting the component names and labels. This renaming improves the clarity and accuracy of the feature, aligning it with its intended functionality of freezing a specific path in the flow.

* [autofix.ci] apply automated fixes

* fix: refactor get_vertex method to handle silent parameter

* fix(base.py): remove unnecessary silent parameter in get_vertex method and remove conditional check for silent parameter in get_vertex method to simplify code and improve readability

* Added new freezeAll icon

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
2024-07-16 23:48:20 +00:00
Lucas Oliveira
0897ee542a
feat: logs on component output (#2740)
* Added tabs and passed the type of the table to the SwitchOutputView component

* Added type to SwitchOutputViewProps and changed results based on type

* Removed unused import

* Changed type of VertexDataTypeAPI to include logs

* Added condition where type is Logs to display only table

* Added handling when resultMessage is empty to SwitchOutputView

* Removed return that made Logs not appear when its empty

* Fixed logs not appearing

* feat: Add _output_logs attribute to CustomComponent

The code changes include adding a new attribute `_output_logs` to the `CustomComponent` class. This attribute is a dictionary that stores logs related to output values. This change is necessary to enhance the logging functionality of the component.

Note: Please remove any meta information such as issue references, tags, or author names from the commit message.

* feat: Serialize messages with to_json() in BaseCrewComponent

This commit modifies the `BaseCrewComponent` class in the `crew.py` file. It adds serialization of messages using the `to_json()` method to avoid circular reference issues. The `_messages_dict` dictionary is serialized by converting each message object to JSON format. This change enhances the functionality of the component and improves the logging process.

Note: Please remove any meta information such as issue references, tags, or author names from the commit message.

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-16 22:36:10 +00:00
Lucas Oliveira
b9ef29ecd2
fix: update appearing when sending the same code (#2742)
Fixed bug where the update node appeared after sending the same code as before
2024-07-16 21:45:52 +00:00
Lucas Oliveira
c989c315c5
fix: create data component not updating correctly (#2741)
* Fix create data component to use update_build_config to update only the template of the frontend_node

* Fix naming of function post_code_processing to not induce to errors

* Updated starter examples
2024-07-16 21:45:18 +00:00
Lucas Oliveira
424118be7b
feat: add vertical scrolling capability to starter examples (#2739)
* Fixed vertical size of newFlowModal

* Added vertical scroll options to newFlowModal and added wrapper to look nice
2024-07-16 16:40:32 -03:00
Gabriel Luiz Freitas Almeida
e5856b3036
fix: append new tasks to the end of the list (#2737)
fix: append new tasks to the end of the list
2024-07-16 19:12:22 +00:00
Gabriel Luiz Freitas Almeida
402f1f6c53
fix: correct type of logs attribute in ResultDataResponse (#2736) 2024-07-16 19:11:56 +00:00
Gabriel Luiz Freitas Almeida
50dc1e87d1
refactor: move tracers to respective files (#2734)
* refactor: move Tracers to respective files

* feat(pyproject.toml): update langwatch version to 0.1.9 and add langsmith dependency at version 0.1.86
2024-07-16 19:02:16 +00:00
Gabriel Luiz Freitas Almeida
5346db0d0c
feat: add logs field to ResultData and Vertex class (#2732)
* feat: add logs to ResultDataResponse in schemas.py

* feat(schema.py): add logs field to ResultData class to store log messages for better debugging and monitoring

* feat(vertex): add logs attribute to Vertex class to store logs for each vertex operation
2024-07-16 18:24:55 +00:00
Lucas Oliveira
643271df40
fix: component seems to be clickable (#2731)
* Changed card to not have shadow on hover if it is a component

* removed unused console.log
2024-07-16 18:15:07 +00:00
anovazzi1
2d92233fc5
refactor: optimize deletion of messages (#2714)
* feat: optimize deletion of messages in SessionView component

This commit optimizes the deletion of messages in the SessionView component by using the useDeleteMessages hook from the API queries. It replaces the useRemoveMessages hook that was previously used. The new implementation handles the deletion of messages more efficiently and provides better error handling. The selectedRows state is updated after successful deletion, and a success message is displayed to the user. In case of an error, an error message is shown.

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

* feat: optimize deletion of messages in SessionView component

This commit optimizes the deletion of messages in the SessionView component by using the useDeleteMessages hook from the API queries. It replaces the useRemoveMessages hook that was previously used. The new implementation handles the deletion of messages more efficiently and provides better error handling. The selectedRows state is updated after successful deletion, and a success message is displayed to the user. In case of an error, an error message is shown.

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

* refactor: optimize deletion of messages in SessionView component

This commit optimizes the deletion of messages in the SessionView component by using the useDeleteMessages hook from the API queries. It replaces the useRemoveMessages hook that was previously used. The new implementation handles the deletion of messages more efficiently and provides better error handling. The selectedRows state is updated after successful deletion, and a success message is displayed to the user. In case of an error, an error message is shown.

* [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>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
2024-07-16 18:10:25 +00:00
Rogério Chaves
89f2f62041
Add LangWatch Integration (#2608)
* First implementation of LangWatch tracer

* Update to langwatch 0.1.4 to use root span for better control of the all-wrapping trace, workaround for llm not being used for an actual call and better ids on langwatch ui

* Remove dependency from backend base internal and add langwatch docs

* [autofix.ci] apply automated fixes

* Fix using session id for metadata, except if the same as flow_id

* Fix wrong error variable and support for python <3.10 is not necessary given langflow pyproject restrictions

* Bump langwatch to v0.1.4

* [autofix.ci] apply automated fixes

* Remove extra line the popped up

* Fix missing log parameter on method

* Fix mypy issues

* Bump langwatch to v0.1.7 to truncate large documents

* Move docs to the right folder

* chore: update lock

* chore: Update clarifai-grpc to version 10.6.4, cohere to version 5.6.1, langwatch to version 0.1.3, and litellm to version 1.41.23

---------

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-07-16 10:28:57 -07:00
Lucas Oliveira
3d02075170
fix: sorting on advanced modal parameters (#2730)
Added sorting in advanced values
2024-07-16 17:27:21 +00:00
Lucas Oliveira
caae43bc9b
fix: empty input message on empty streaming (#2729)
Fixed streaming bug where it shows a message before starting streaming
2024-07-16 17:26:55 +00:00
anovazzi1
b7223063c7
refactor: update edit messages text on Session view compoenent (#2715)
* feat: Add useUpdateMessages hook for updating messages

* refactor: Update useUpdateMessages hook to use singular naming convention

* refactor: update on session view

* [autofix.ci] apply automated fixes

* refactor: delete unused function

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-16 17:44:04 +02:00
Carlos Coelho
afc11e1fa7
feat: update bug report template for better issue reporting (#2727)
* feat: update bug report template for better issue reporting

* feat: Update bug report template for better issue reporting

* Create bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update and rename bug-report.yaml to bug-report

* Rename bug-report to bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Create feature-request.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update bug-report.yaml

* Update feature-request.yaml

* Update bug-report.yaml

* Delete .github/ISSUE_TEMPLATE/bug_report.yaml

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-16 07:45:30 -07:00
Igor Carvalho
c4b86e9d63
Fix: Clicking tags on share modal updates store immediately (#2720)
* Fix: Click tags on share modal share component to the store immediately

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-07-16 14:41:28 +00:00
Jinwoo Park (Curt)
8291aa9c24
docs: fix invalid hyperlinks in README.md (#2719)
Fix invalid hyperlinks in README.md
2024-07-16 07:29:16 -07:00
Ítalo Johnny
a534ac7619
chore: make error messages more generic (#2726)
* chore: make error messages more generic

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-16 14:24:08 +00:00
Gabriel Luiz Freitas Almeida
7d3fac6f10
fix: update chat components to make them backwards compatible (#2725)
* feat: Add conditional check for storing message in ChatOutput

* refactor: Update store_message method in ChatComponent for backward compatibility

* refactor: update input name to not collide with method name
2024-07-16 11:19:53 -03:00
Daniel Gines
e56a1c1e10
Improve Makefile: color output, clean commands, dependency checks (#2672)
* feat: Add Gemma 2 to Groq model list (#2586)

Add gemma2 to groq_constants.py

* Improve Makefile: color output, clean commands, dependency checks

- Add colored output to 'make help' for various shells.
- Add 'clean_all', 'clean_python_cache', and 'clean_npm_cache' commands.
- Check for installed tools: 'poetry', 'docker', 'pipx', and 'npm'.

* Added success message at the end of the check_tools target to indicate all required tools are installed.
2024-07-16 09:56:05 +00:00
Gabriel Luiz Freitas Almeida
5ef84f7911
feat: add CrewAI components and refactor codebase (#2647)
* feat: Add CrewAI icon component

This commit adds the CrewAI icon component to the project. The component is imported and used in the styleUtils file, allowing it to be used throughout the application. This addition enhances the visual representation of the CrewAI feature in the user interface.

* feat: Add CrewAI[tools] dependency to project

This commit adds the CrewAI dependency to the project by including it in the pyproject.toml file. The version specified is "^0.36.0" and the "tools" extras are included. This addition allows the project to utilize the features provided by CrewAI.

* fix: update crewai icon size

* feat: Add CrewAIAgent component

This commit adds the CrewAIAgent component to the project. The component represents an agent of CrewAI and includes various inputs and outputs for role, goal, backstory, tools, language model, memory, verbosity, and delegation. This addition enhances the functionality of the project by integrating with CrewAI and allows for more advanced agent-based interactions.

* feat: Add CrewAICrew component

This commit adds the CrewAICrew component to the project. The component represents a group of agents and defines how they should collaborate and the tasks they should perform. It includes various inputs and outputs for tasks, agents, topic, verbosity, memory, cache, max RPM, process, and more. This addition enhances the functionality of the project by integrating with CrewAI and allows for more advanced agent-based interactions.

* feat: Add CrewAITask component

This commit adds the CrewAITask component to the project. The component represents a task in CrewAI and includes inputs for description, expected output, tools, agent, and async execution. It also provides an output for the task itself. This addition enhances the functionality of the project by integrating with CrewAI and allows for the creation and execution of tasks within the system.

* refactor: Update build configuration in custom_component_update endpoint

This commit updates the build configuration in the custom_component_update endpoint of the endpoints.py file. The previous implementation was assigning the result of code_request.get_template() directly to the build_config parameter, which caused an issue. The updated code now assigns the result to the updated_build_config variable before passing it to the cc_instance.update_build_config() method. This change ensures that the correct build configuration is used and improves the functionality of the custom_component_update endpoint.

* feat: Add SequentialTask and HierarchicalTask classes

This commit adds the SequentialTask and HierarchicalTask classes to the tasks.py file in the base/agents/crewai directory. These classes represent different types of tasks in the CrewAI system. The SequentialTask class is used for sequential tasks, while the HierarchicalTask class is used for hierarchical tasks. This addition enhances the functionality of the project by providing the necessary classes for implementing different types of tasks in CrewAI.

* refactor: Update CrewAIAgentComponent class name

This commit updates the class name from "CrewAIAgent" to "CrewAIAgentComponent" in the CrewAIAgent.py file. The new name better reflects the nature of the class as a component and improves the clarity of the codebase.

* refactor: Update CrewAICrewSequential component

This commit adds the CrewAICrewSequential component to the project. The component represents a group of agents and defines how they should collaborate and the tasks they should perform in a sequential manner. It includes various inputs and outputs for tasks, verbosity, memory, cache, max RPM, and more. This addition enhances the functionality of the project by providing a specific component for sequential tasks in the CrewAI system.

* feat: Add CrewAICrewHierarchical component

This commit adds the CrewAICrewHierarchical component to the project. The component represents a group of agents and defines how they should collaborate and the tasks they should perform in a hierarchical manner. It includes various inputs and outputs for tasks, verbosity, memory, cache, max RPM, and more. This addition enhances the functionality of the project by providing a specific component for hierarchical tasks in the CrewAI system.

* refactor: Rename CrewAITask.py to CrewAITaskHierarchical.py

This commit renames the file "CrewAITask.py" to "CrewAITaskHierarchical.py" in the "helpers" directory of the "langflow/components/helpers" package. The new name better reflects the purpose of the file, which is to define the "CrewAITaskHierarchical" component. This change improves the clarity and organization of the codebase.

* feat: Add CrewAITaskSequential component

This commit adds the CrewAITaskSequential component to the project. The component represents a sequential task in CrewAI and includes inputs for task description, expected output, tools, agent, and async execution. It also provides an output for the task itself. This addition enhances the functionality of the project by integrating with CrewAI and allows for the creation and execution of sequential tasks within the system.

* feat: Add BaseCrewComponent class

This commit adds the BaseCrewComponent class to the project. The class represents a group of agents, defining how they should collaborate and the tasks they should perform. It includes various inputs and outputs for tasks, verbosity, memory, cache, max RPM, and more. This addition enhances the functionality of the project by providing a base component for creating and managing crews in the CrewAI system.

* refactor: Update display name of CrewAIAgentComponent to "CrewAI Agent"

* refactor: Remove CrewAICrewHierarchical component

This commit removes the CrewAICrewHierarchical component from the project. The component represented a group of agents and defined how they should collaborate and the tasks they should perform in a hierarchical manner. However, it is no longer needed and has been deemed unnecessary for the current project requirements. This removal streamlines the codebase and improves the clarity of the project.

* refactor: make Crew use BaseCrew class

* refactor: Replace CrewAICrewSequential with SequentialCrew

This commit replaces the deprecated CrewAICrewSequential component with the new SequentialCrew component. The SequentialCrew component represents a group of agents and defines how they should collaborate and the tasks they should perform in a sequential manner. This change improves the clarity and organization of the codebase by using a more descriptive and consistent naming convention for the component. It also aligns with the recent refactorings in the project, such as the removal of the CrewAICrewHierarchical component and the addition of the BaseCrewComponent class. Overall, this update enhances the functionality and maintainability of the project.

* refactor: Rename CrewAITaskHierarchical.py to HierarchicalTask.py

This commit renames the file "CrewAITaskHierarchical.py" to "HierarchicalTask.py" in the "helpers" directory of the "langflow/components/helpers" package. The new name better reflects the purpose of the file, which is to define the "HierarchicalTask" component. This change improves the clarity and organization of the codebase.

* refactor: Rename CrewAITaskSequential.py to SequentialTask.py

This commit renames the file "CrewAITaskSequential.py" to "SequentialTask.py" in the "helpers" directory of the "langflow/components/helpers" package. The new name better reflects the purpose of the file, which is to define the "SequentialTaskComponent" component. This change improves the clarity and organization of the codebase.

* style: reorder imports

* chore: update lock

* refactor: Refactor build_crew method in BaseCrewComponent

This commit refactors the build_crew method in the BaseCrewComponent class. The method was previously taking tasks and agents as arguments, but it was not using them correctly. This update removes the unnecessary arguments and fixes the method to correctly build a Crew object. This refactor improves the clarity and functionality of the codebase.

* refactor: Update status assignment in CrewAIAgentComponent

This commit updates the status assignment in the CrewAIAgentComponent class. Previously, the status was set using the `model_dump()` method of the agent, but it has been changed to use the `repr()` method instead. This change improves the clarity and consistency of the codebase.

* refactor: Add agents input to HierarchicalCrewComponent

This commit adds the "agents" input to the HierarchicalCrewComponent class in the "HierarchicalCrew.py" file. The "agents" input is a list of "Agent" objects and allows for better management and collaboration between agents within the crew. This addition enhances the functionality and flexibility of the HierarchicalCrewComponent, improving the overall codebase.

* refactor: Fix post_process_raw function in artifact.py

This commit fixes the post_process_raw function in the artifact.py file. Previously, the function was not correctly handling the case when the raw data was a BaseModel or a dictionary. This update ensures that the raw data is properly encoded using jsonable_encoder and updates the artifact_type accordingly. This fix improves the functionality and reliability of the codebase.

* refactor: Update CustomComponent's repr_value handling

This commit updates the repr_value handling in the CustomComponent class. Previously, the repr_value was being modified directly within the class, which could lead to unexpected behavior. This update ensures that the repr_value is returned instead of modifying it directly. Additionally, it adds proper handling for different types of repr_value, such as dictionaries and BaseModel objects. This refactor improves the clarity and maintainability of the codebase.

* update lock

* refactor: Add task input to SequentialTaskComponent

This commit adds the "task" input to the SequentialTaskComponent class in the "SequentialTask.py" file. The "task" input is a SequentialTask object that will perform the task. This addition enhances the functionality and flexibility of the SequentialTaskComponent, improving the overall codebase.

* refactor: Change log level of file retrieval message in LocalStorageService

* refactor(crew.py): update import statement to include InputTypes from langflow.inputs.inputs module to enhance code readability and maintainability

* chore: Update cachetools dependency to version 5.4.0

* feat(crew.py): add new methods get_task_callback and get_step_callback to handle task and step callbacks respectively

* refactor: Add allow_code_execution input to CrewAIAgentComponent

This commit adds the "allow_code_execution" input to the CrewAIAgentComponent class in the "CrewAIAgent.py" file. The "allow_code_execution" input is a boolean value that determines whether the agent is allowed to execute code. This addition enhances the functionality and flexibility of the CrewAIAgentComponent, improving the overall codebase.

* Add step_callback and task_callback inputs to HierarchicalCrewComponent and SequentialCrewComponent

* style(SequentialTask.py): remove unnecessary 'required' attribute from input definition in SequentialTaskComponent class

* chore: fix lint issues
2024-07-15 16:56:47 -07:00
Gabriel Luiz Freitas Almeida
e1542dc672
chore: update setuptools dependency to version 70 or higher (#2713)
* chore: Update setuptools dependency to version 70 or higher

* chore: new lock
2024-07-15 15:22:03 -07:00
Gabriel Luiz Freitas Almeida
b811dcc34c
chore: move test-cli job to run separately from unit tests (#2712) 2024-07-15 13:33:30 -07:00
Gabriel Luiz Freitas Almeida
3edc782545
fix: Update telemetry schema to allow for optional error message (#2711) 2024-07-15 20:18:07 +00:00
Gabriel Luiz Freitas Almeida
6e006354c3
fix: update telemetry schema and fix telemtry calls (#2708) 2024-07-15 16:16:23 -03:00
Gabriel Luiz Freitas Almeida
4268ee4d56
chore: Update python_test.yml to include splitCount and group arguments in make unit_tests command (#2709) 2024-07-15 16:13:26 -03:00
Gabriel Luiz Freitas Almeida
c8d04af533
refactor(CustomComponent): make initialization separate from constructor (#2704) 2024-07-15 18:37:10 +00:00
Ítalo Johnny
d93382e90a
refactor: runnable_vertices_manager.py (#2646)
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-15 17:57:00 +00:00
Gabriel Luiz Freitas Almeida
537e358b65
fix: update condition to run end_all_traces (#2707) 2024-07-15 09:13:49 -07:00
Igor Carvalho
a3959650fc
refactor: store tags API (#2678)
* feat: create useGetTags hook to handle tags API

* refactor: use useGetTagsQuery hook to handle tags

* [autofix.ci] apply automated fixes

* refactor: remove unnecessary state handling

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-07-15 12:39:25 +00:00
Gabriel Luiz Freitas Almeida
1b0dbd7fb5
docs: add CNAME file for custom domain (#2685) 2024-07-13 01:21:22 -07:00
github-actions[bot]
b731983f31
docs: update docs from notion (#2684)
Co-authored-by: lucaseduoli <lucaseduoli@users.noreply.github.com>
2024-07-12 16:36:29 -07:00