-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add tool mode to components, Added current date tool to agent #4439
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ponent.spec.ts, sliderComponent.spec.ts, tableInputComponent.spec.ts, stop-button-playground.spec.ts, generalBugs-shard-7.spec.ts): enable tests that were previously skipped to ensure proper functionality and coverage. Remove outdated comments and update test descriptions for clarity.
…ove content handling
…and loading state
…TextInput` for `input_value` across starter projects.
… track build start and end events
adding current date tool to agent
ogabrielluiz
force-pushed
the
add-tool-mode-to-components
branch
from
November 8, 2024 02:10
966758d
to
cebfb4b
Compare
dosubot
bot
added
size:XL
This PR changes 500-999 lines, ignoring generated files.
and removed
size:M
This PR changes 30-99 lines, ignoring generated files.
labels
Nov 8, 2024
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Nov 8, 2024
dosubot
bot
added
size:M
This PR changes 30-99 lines, ignoring generated files.
and removed
size:XL
This PR changes 500-999 lines, ignoring generated files.
labels
Nov 8, 2024
…flow-ai/langflow into add-tool-mode-to-components
updates to solve the error in Date component as tool.
Tested : |
- Introduced `updateComponentCode` function to handle import and input updates more flexibly using regex patterns. - Updated unit test to utilize the new function for modifying component code, including adding `LinkInput` configuration.
dosubot
bot
added
size:L
This PR changes 100-499 lines, ignoring generated files.
and removed
size:M
This PR changes 30-99 lines, ignoring generated files.
labels
Nov 8, 2024
- Added `tool_mode` attribute to `MessageTextInput` in `CalculatorToolComponent` and `URLComponent` to enable tool mode functionality. - Introduced `add_current_date_tool` option in `AgentComponent` to allow agents to include a tool that returns the current date. - Updated `AgentComponent` to handle the addition of the current date tool as a `StructuredTool`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
lgtm
This PR has been approved by a maintainer
size:L
This PR changes 100-499 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several updates to the
langflow
backend, focusing on enhancing the functionality of components and inputs by adding thetool_mode
attribute, refining tool handling, and expanding test coverage.Enhancements to components and inputs:
Added Current Date as tool to Agent.py
src/backend/base/langflow/components/custom_component/custom_component.py
: Addedtool_mode
attribute toMessageTextInput
in theCustomComponent
class.src/backend/base/langflow/components/data/api_request.py
: Addedtool_mode
attribute to multiple inputs in theAPIRequestComponent
class and handled string type forquery_params
inmake_requests
method. [1] [2] [3]src/backend/base/langflow/components/data/url.py
: Addedtool_mode
attribute toURLComponent
class.src/backend/base/langflow/components/helpers/current_date.py
: Addedtool_mode
attribute toCurrentDateComponent
class.src/backend/base/langflow/components/tools/calculator.py
: Addedtool_mode
attribute toCalculatorToolComponent
class.src/backend/base/langflow/components/vectorstores/chroma.py
: Addedtool_mode
attribute toChromaVectorStoreComponent
class.Tool handling improvements:
src/backend/base/langflow/base/tools/component_tool.py
: Updated tool handling logic to check fortool_name
andtool_description
when there is only one tool.Test coverage expansion:
src/backend/tests/unit/custom/component/test_component_to_tool.py
: Added a new test for theCustomComponent
to ensure it correctly converts to a toolkit. [1] [2]These changes collectively enhance the functionality and robustness of the
langflow
backend components and inputs.Waiting for #4402