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

feat: Add AgentQL integration #11617

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

colriot
Copy link

@colriot colriot commented Dec 12, 2024

AgentQL is a query language and a set of supporting developer tools designed to identify web elements and their data using natural language and return them in the shape you define.
Added AgentQL data extraction component. See: https://docs.agentql.com/rest-api/api-reference

This pull request introduces a new component, AgentQL, to both the backend and frontend of the project. The changes include the implementation of the AgentQL component, its integration into the frontend, and the addition of a new icon for AgentQL.

Tested by running in UI:
image

image

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 🔨 feat:tools Tools for agent, function call related stuff. labels Dec 12, 2024
@shuhaodo
Copy link

Does dify support multiline editor for the AgentQL query input?

image

Copy link
Author

@colriot colriot left a comment

Choose a reason for hiding this comment

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

I have a few additional questions along the lines of code below (forgot to submit them yesterday)

en_US: AgentQL Query
human_description:
en_US: The AgentQL query to execute. Read more at https://docs.agentql.com/agentql-query.
form: form
Copy link
Author

Choose a reason for hiding this comment

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

I noticed that form value requires users to provide value manually, but llm value requires another block to pass the value in. Is there a way to allow both? And if not, it seems that llm is better for both url and query in this case. Am I on the right track?

On the other side, I don't expect LLM to "generate" a query, but it's more like "I need a way to dynamically provide it, not by LLM exactly"

en_US: The public URL of the webpage to extract data from.
form: form
- name: query
type: string
Copy link
Author

Choose a reason for hiding this comment

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

Is there a way to configure multiline UI for a string-based param?

timeout = tool_parameters["timeout"]

params = {}
params["mode"] = tool_parameters.get("mode", "fast")
Copy link
Author

Choose a reason for hiding this comment

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

Do I still need to provide default values here or can I just rely on default values in yaml config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 feat:tools Tools for agent, function call related stuff. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants