-
Notifications
You must be signed in to change notification settings - Fork 13k
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
chore: refactor the http executor node #5212
Conversation
@Yeuoly @bowenliang123 please review it, thanks |
Hi, thanks a lot for the refactoring! but there are still some parts that need improvement. Specifically, in the core.tools.tool.api_tool, the |
+1 for refactoring the HTTP requesting both in HTTP executor node and in API tools, unifying into using |
BTW, please rebase the changes onto the latest commits. Update the poetry dependencies in pyproject.yml and poetry lockfile as well (running |
Please fix the CI |
as this PR(#5319) merged will fix the CI |
Wait for #5319 fixing the problem merged, and then rebase onto it. |
done! please review again. @Yeuoly @bowenliang123 |
LGTM overall. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for your great job! |
* refs/heads/main: (31 commits) feat: support predefined models for openrouter (#5494) chore: refactor the http executor node (#5212) chore: add create_json_message api for tools (#5440) fix(api/model_runtime/azure/llm): Switch to tool_call. (#5541) Fix: position of log modal (#5538) feat: Add program_name attribute to TiDB connection (#5499) add opensearch default value (#5536) feat: make Citations and Attributions display enable default (#5508) Fix: resolve issue with embedding model field visibility toggling on datasets page (#5451) Fix: custom disclaim (#5535) Chore: chat log refactor (#5523) feat: use root dir to start python and celery (#5515) feat: add new features to enhance image and link handling in Jina tool (#5517) fix: apply best practices for the latest buildkit (#5527) fix: added error handling for novita ai tool query (#5506) feat: add Asia/Ho_Chi_Minh timezone (#5521) fix: correct typos (#5510) chore: use singular style in middleware config class name (#5502) refactor: extract hosted service configs into dify config (#5504) fix: summary of duckduckgo_search (#5488) ... # Conflicts: # api/core/app/apps/advanced_chat/app_generator.py # api/poetry.lock # api/requirements.txt
* refs/heads/feat/cleaning_ops_trace: (21 commits) feat: add provider_config_map feat: update poetry.lock update WorkflowNodeExecution init created_at chore: change ops_trace_service location feat: support predefined models for openrouter (#5494) chore: refactor the http executor node (#5212) chore: add create_json_message api for tools (#5440) fix(api/model_runtime/azure/llm): Switch to tool_call. (#5541) Fix: position of log modal (#5538) feat: Add program_name attribute to TiDB connection (#5499) add opensearch default value (#5536) feat: make Citations and Attributions display enable default (#5508) Fix: resolve issue with embedding model field visibility toggling on datasets page (#5451) Fix: custom disclaim (#5535) Chore: chat log refactor (#5523) feat: use root dir to start python and celery (#5515) feat: add new features to enhance image and link handling in Jina tool (#5517) fix: apply best practices for the latest buildkit (#5527) fix: added error handling for novita ai tool query (#5506) feat: add Asia/Ho_Chi_Minh timezone (#5521) ... # Conflicts: # api/core/ops/model.py # api/poetry.lock
Description
Change List:
requests
of ssrf_proxy. In the past, we use bothhttpx
andrequests
because it support body of DELETE method. Now we can use httpx to achieve it too. more details hereOPTION
method of backend, and make theGET
/DELETE
/HEAD
also support http body. This maintains the consistency between the front-end and back-end. In the past , we implicit drop the body ofGET
.proxies
parameter will be deprecate later, use a singleproxy
for all request maybe more commonly used.*args
of ssrf_proxy request methods, cause httpx only support**kwargs
._to_dict
method which convert params/headers/body from frontend to python dict, and add test for it.Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Integration test and local test.
Suggested Checklist:
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint godsoptional
I have made corresponding changes to the documentationoptional
I have added tests that prove my fix is effective or that my feature worksoptional
New and existing unit tests pass locally with my changes