Skip to content
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

fix: validation for tool name #4790

Merged
merged 2 commits into from
Nov 22, 2024
Merged

Conversation

edwinjosechittilappilly
Copy link
Collaborator

Tool name validation based on open ai Schema for tool names

Note: In case of Agent as Tool. This doesnt work if it tool is a Tool for Agent as tool. Only check when the agent as tool is invoked.
This pull request introduces changes to the agent validation and creation process in the src/backend/base/langflow/base/agents/agent.py file. The most important changes include the addition of a tool name validation method and its integration into the agent-building process.

Agent Validation and Creation Improvements:

Miscellaneous:

Tool name validation based on open ai Schema for tool names
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 22, 2024
@phact
Copy link
Collaborator

phact commented Nov 22, 2024

I tested it locally and it works great, I see the error clearly in the UI:

image

@github-actions github-actions bot added the bug Something isn't working label Nov 22, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 22, 2024
Copy link

codspeed-hq bot commented Nov 22, 2024

CodSpeed Performance Report

Merging #4790 will degrade performances by 20.69%

Comparing fix-agent-tool-naming (23fbf6c) with main (08849b6)

Summary

❌ 1 regressions
✅ 14 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main fix-agent-tool-naming Change
test_successful_run_with_output_type_any 232.3 ms 292.9 ms -20.69%

@edwinjosechittilappilly edwinjosechittilappilly enabled auto-merge (squash) November 22, 2024 18:42
@edwinjosechittilappilly edwinjosechittilappilly merged commit 230a019 into main Nov 22, 2024
30 checks passed
@edwinjosechittilappilly edwinjosechittilappilly deleted the fix-agent-tool-naming branch November 22, 2024 18:56
diogocabral pushed a commit to headlinevc/langflow that referenced this pull request Nov 26, 2024
validation for tool name

Tool name validation based on open ai Schema for tool names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants