dify icon indicating copy to clipboard operation
dify copied to clipboard

Add SearchApi tools

Open SebastjanPrachovskij opened this issue 1 year ago • 2 comments

Description

We have integrated a new tool - SearchApi. Right now we added Google, Google Jobs, Google News, and YouTube Transcripts engines.

  • This is our initial PR; we want to improve it later based on the users' feedback. Most likely changes will affect how the final results string is being built.
  • Feel free to assign @SebastjanPrachovskij as a main reviewer for any SearchApi-related searches. We will be glad to help and support dify development.

Type of Change

Please delete options that are not relevant.

  • [x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • By creating a workflow in the studio.

Suggested Checklist:

  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings
  • [x] I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • [ ] optional I have made corresponding changes to the documentation
  • [ ] optional I have added tests that prove my fix is effective or that my feature works
  • [ ] optional New and existing unit tests pass locally with my changes

SebastjanPrachovskij avatar May 24 '24 17:05 SebastjanPrachovskij

Hey Dify team!

We would like to include an example of a workflow where the YouTube Transcripts API is used to retrieve text from a YouTube video, and then an LLM model is used to summarize the text. More details can be found in the LangChainJS Summarization Example

How could we create such an example with LLM?

SebastjanPrachovskij avatar May 24 '24 17:05 SebastjanPrachovskij

Hello thanks for your contribution.

We are working on restructure codes and UI of the tools. It will be release in a few days. So I will check this pr by that time.

See the attachment below. image

crazywoola avatar May 25 '24 05:05 crazywoola

Hey @crazywoola,

Thanks for the review. I addressed suggested changes, updated the SearchApi description, and returned results based on result_type.

I think it is ready to be reviewed again 😊

SebastjanPrachovskij avatar May 28 '24 12:05 SebastjanPrachovskij

Error: /workspace/api/core/tools/provider/builtin/searchapi/tools/youtube_transcripts.yaml:22:22: [error] too many spaces after colon (colons)

And there is a lint error as well. @SebastjanPrachovskij

crazywoola avatar May 29 '24 07:05 crazywoola

Thanks for contributions!

Yeuoly avatar May 30 '24 03:05 Yeuoly