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

Refactored and improved PythonCodeStructuredTool, SearXNGTool, and RunnableExecutor #3239

Merged
merged 9 commits into from
Aug 9, 2024

Conversation

goliath-yamon
Copy link
Contributor

PythonCodeStructuredTool

  • Inputs for function arguments description will be automatically added when updating tool_code.
  • Added an input for global variables without having to declare them as arguments of function.
  • Types of function arguments can be declared any types.
  • If you want to declare custom Enum, you can declare it into tool_code.

SearXNGTool

  • Created this tool to search through SearXNG.

RunnableExecutor

  • Allowed the output to be streamed (The agent must have chat model such as LLM).
  • Changed the build method to asynchronous.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request python Pull requests that update Python code labels Aug 8, 2024
Copy link
Contributor

github-actions bot commented Aug 8, 2024

Pull Request Validation Report

This comment is automatically generated by Conventional PR

Whitelist Report

Whitelist Active Result
Pull request is a draft and should be ignored
Pull request is made by a whitelisted user and should be ignored
Pull request is submitted by a bot and should be ignored
Pull request is submitted by administrators and should be ignored

Result

Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated.

Validation Report

Validation Active Result
All commits in this pull request has valid messages
Pull request does not introduce too many changes
Pull request has mentioned issues
Pull request has valid branch name
Pull request should have a non-empty body
Pull request has a valid title

Result

Pull request is invalid.

Reason

  • Pull request title does not follow the desired pattern

Last Modified at 08 Aug 24 04:42 UTC

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3239.dmtpw4p5recq1.amplifyapp.com

@YamonBot
Copy link
Contributor

YamonBot commented Aug 8, 2024

For RunnableExecutor, we are using LangChain's streaming attribute, which doesn't seem to be captured by the tracer since it is neither a callback nor an output parser. I would like to know the core team's opinion on separating this into a dedicated AgentStreamingExecutor.

result_value, _status = self.get_output(result, self.input_key, self.output_key)
status += _status
status += f"\n\nOutput: {result_value}\n\nRaw Output: {result}"
self.status = status
return result_value

async def astream_events(self, input):
async for event in self.runnable.astream_events(input, version="v1"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what you could do is use the callbacks's methods for each type of event.

Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @goliath-yamon

Sorry for the other PR ^^"

The RunnableExectutor needs some work it seems but the others look good to me. Let me know if you want to split them up into different PRs.

Also, if you create a new branch on your fork, it is easier for us to make any fixes

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 8, 2024
@goliath-yamon
Copy link
Contributor Author

Hey @ogabrielluiz

Thank you for your answer.

Yes, if you can split them, do that please :)

After this, I will create a new branch to fix any issues or create any features.

@ogabrielluiz ogabrielluiz merged commit 5ce8cbd into langflow-ai:main Aug 9, 2024
37 of 50 checks passed
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 python Pull requests that update Python code size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants