8000 GitHub - stingfeng/dify-extensions: Variable extensions for the Dify project
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

stingfeng/dify-extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README in English 简体中文版自述文件

dify-extensions

This repository is used to save my extensions for the Dify project.

chat-dify

chat-dify is a demo created using the assistant-ui project, demonstrating how to call the Dify Chat API like calling LLM APIs.

The project first implements a Dify Provider of the Vercel AI SDK, located in the chat-dify/lib/chat/providers/dify directory, allowing developers to use the Vercel AI SDK to call the Dify API like calling an LLM. It then implements the chat UI based on assistant-ui.

How to use

  1. Copy the chat-dify/lib/chat directory to your project;
  2. Copy the api/dify/route.ts file to your project;
  3. Refer to the chat-dify/app/page.tsx file to add the assistant-ui's Thread component to your project;
  4. Refer to the chat-dify/app/layout.tsx file to add the RuntimeProviderEdge component to your project and set the API parameter.

tools/googlecustomsearch

Google Custom Search tool. The official Google Search plugin provided by Dify relies on Serp API, which offers only 100 free searches per month. Google Custom Search uses the Custom Search API provided by Google, offering 100 free searches per day.

How to use

  1. Copy the googlecustomesearch directory to the api/core/tools/provider/builtin directory of the Dify project;
  2. Compile the Dify API docker image.

tools/textsimilarity

Text similarity calculation, used to measure the similarity between the content recalled from the knowledge base and the answers provided by the LLM. For example, if you recall 3 pieces of material from the knowledge base and provide them to the LLM to answer a user's question, you may want to know which piece of material the LLM's answer referenced, or if it referenced any of the provided materials at all. This can be determined by calculating the similarity between them.

How to use

  1. Copy the textsimilarity directory to the api/core/tools/provider/builtin directory of the Dify project;
  2. Compile the Dify API docker image.

About

Variable extensions for the Dify project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0