Intro: Dify update and new model support
Around 3 months ago I had made a video on a tool that helps you create powerful large language model applications like Flowise. It's called Dify, also known as Do It For You. It's an all-in-one solution for seamlessly building and managing AI-native apps based on ranges of large language models. Three months ago you were restricted to only using ChatGPT models for creating LLM-based apps. However, you are now open to the possibility to use open-source as well as closed-source models such as LLaMA, Anthropic, and so many others.
New features: plugins, embeddings, and dataset services
Now this could be used for AI app creation, prompt engineering, and many other possibilities. You have way more features and plugins such as a new support for Hugging Face embedded models. You have dataset services as well as integration of prompt engineering. Just take a look at this example where you're able to now add Hugging Face or Replicate API keys plus the model name so that you're able to call any open-source model on the model providers. They added this functionality where you're able to utilize many different ranges of large language models to create these large language model applications. This brings in so much more flexibility and customization to what you're trying to create, and this will be really useful for a lot of people who are focusing on open-source projects as this is a great gateway for you to create them as it's an easy and efficient way to do so. Throughout today's video we're going to dig a little bit deeper on Dify by exploring these new features that we haven't covered before, and we're also going to take a look at how you can get started with it and showcasing just a brief overview of this application.
What Dify does and use cases
Hey guys I started this new thing where I'm going to be offering my one-on-ones with you guys. If you're interested in this I can definitely help you develop a solution for AI tools, help you brainstorm ideas, as well as basically elevating what you're trying to accomplish with my knowledge. If you're interested in this definitely take a look at the link in the description below. Hey, what is up guys, welcome back to another YouTube video at World of AI. In today's video we're going to take a look at Dify which is an AI tool focused on creating and operating AI-native apps with a range of different large language models, not restricted to only using the GPT models. You are able to use open-source models for creating these free applications. This is quite similar to what Flowise was capable of doing, but this is a more user-friendly way to use this LM Ops platform as you're able to use this for teams to develop AI applications and operate them visually. With Dify you are able to create these AI-powered applications within minutes, whether it's for internal teams to use or external releases, and you can deploy them quickly within just five minutes. The tool provides various different features such as Storyteller bots for answering specific questions, you have an SQL generator for converting natural language to SQL, you have a code converter for converting programming languages, and a text generator for summarizing key information sets.
Demo: Building an SQL generator app
Now you're also able to code complete with this model which is absolutely insane as you have such a wide range of different tasks that you could complete with the AI applications that are made off of Dify. It can create out-of-the-box websites supporting form mode and chat conversation modes with a single API encompassing plugin capabilities as well as context enhancements and such. You save so much backend coding effort; you have so much time to focus on the visual data analysis that's presented through Dify. It saves you time with log review, annotations for applications, and so much more. In simple terms it's increasing your productivity while using Dify as it saves you time with all the hassle that is there for creating AI applications. This is why I wanted to put emphasis on this because of these new amazing features and plugins that were released with this new update. So let's get to the next step of the video where I showcase how to download it and then we will go quickly into showcasing how you can actually use this. For the case of this video I want to be showcasing how to create an app. It's fairly easy. What I did is create an SQL generator. In this case I clicked on create new app and selected text generator. I provided the name, clicked continue, and I created it. It's fairly easy and I'll then take you to this overview page in which you can go and set up the model provider. I selected the base model that is provided which is completely free, which is the OpenAI-based model. In this case you're able to utilize open-source models but I'm just going to go ahead and use OpenAI, selected the GPT-3.5 turbo reasoning method as well as using the text embedding Ada model.
Preview, debugging, and deployment options
Once this is all set you can configure plugins but in this case we're not going to be using that. We have done that and then go onto the prompt engineering tab and then you're able to set the actual prompt where I said that you are an SQL generator that will help users translate their input natural language query requirements and target database. It does this by putting this into the target SQL statement and you're now able to deploy this fairly easily after you save it. Now you're able to debug it as well which is really useful. You can preview this off the preview tab which allows you to select database types. I did not do any of this; it did it on its own and it was able to create all this from a single prompt which is absolutely amazing. You're able to use SQL, MySQL, SQL Server, and so forth. You're able to run the batch with your own file and you can input whatever text that you want to translate for the SQL generator. You can then execute it and it'll have this output which you can copy, save, as well as export it. That's as easy as that in creating your own LLM-based application. Now there's two ways to install this: you can access it through the cloud as well as installing it using Docker. This is something that you can do with Docker Compose. There are a couple of commands in which you can do so. You can set this up with Docker and then compose it with the command. I recommend that you check out the requirements because you need to have a CPU greater than or equal to two cores and more than 4 GB of RAM to have this functional. These are just the minimum system requirements, so keep that in mind. It'll be more functional with better specs. The best case is to use the cloud service as you can access it right away off their website; just create an account and you can get started right away.
Account, dashboard, and available templates
Quickly let's go over some of the cool features. You can use different large language models; you're able to utilize LangChain, Hugging Face, and Replicate to utilize open-source models. You can see that there is access to a wide range of different options in terms of utilizing large language models to create applications. They also provide the following free resources for registered Dify Cloud users which gives you 200 free OpenAI calls. This will allow you to build OpenAI-based apps. You have visual registration which is a UI that helps you plug and play and create applications. You have text embeddings, and you have API-based services which allow you to access web apps directly and integrate the API without any complex backend services. Once you have created an account you'll be sent to the dashboard where you're able to discover different apps that could be created with Dify. You have a code interpreter that can be created, job advertisements, personalized dialogues, chatbots, and so much more. There are different categories such as programming, entertainment, writing assistant, translate, as well as HR. If you click on the code interpreter you can start chatting with it right away which will solve different coding-related things. I previously asked it to write Python code for a basic Snakes and Ladders game which it did and it created functional code for it. You can delete or generate such things. You're able to also start from scratch by building your own chatbot app or focus on different AI applications. You're also able to choose from different templates that are already built which will be easier for many people.
Datasets, plugins, and the World of AI chatbot
If you go to the plugins tab this is something they're continuously working on which will be incorporated fairly soon. If you click on the dataset tab you can create your own datasets and train different apps based on your own data. You can upload files straight from your desktop and you're able to sync from Notion as well as from websites, which is a feature they're incorporating shortly. In this video I'm going to showcase a chat that I made, the World of AI chatbot, which you can deploy and export and embed into a different workflow. You can start chatting with it and I believe this one was trained with my own channel's data, so it answers questions based on what the channel is about. It gives references to what the channel is and gives more idea about what AI and machine learning are. That's basically the gist of what I created with this World of AI chatbot. It's fairly easy to do. You can have a prompt engineering feature to focus on a certain context. It has API access which can be integrated with different plugins and APIs so it could be output to another place. You can see logs and annotations that help you track responses. That's basically a gist of how this operates.
Model provider configuration and docs
If you click on the blue button 'Setup Model Provider' within your application you're able to configure and select the models you want. They give you two models on trial: you can utilize GPT-4 and GPT-3.5 Turbo; they give you tokens that are free. You can use 200 calls from OpenAI and 600 tokens from Anthropic. Once you have used those up you can purchase more and input your own API keys. You're able to select reasoning model types as well as embedding models and speech detection models. If you do not want to use these you can search through different models that could be implemented. You can use a range of different open LM providers. For example, if you're going to use Hugging Face you can click Add. You can do embeddings, text generation model type, set endpoints, and paste your Hugging Face API token. For the model you copy the model card on Hugging Face and paste it here, click save and move forward. I didn't upload my API key so it wouldn't show, but that's easy. If you go to Data Source you can add your workspace from Notion and play around with different plugins. You can work with SERP, the Google Search API, and integrate things like GitHub and Google. You're able to work with different languages, so check that out if you want anything other than English. The Model Provider tab is about configuring these options. If you want to configure further you can go to the Documentation tab and get started with tutorials which will help you learn more about advanced features of Dify. That basically concludes today's video. I hope you got more insight into what you can do with this updated Dify model. I'll leave all these links in the description below. Check out the consulting page if you want to book a one-on-one with me, follow the Patreon page, check our Discord, follow World of AI, and subscribe with the notification bell. Like the video and check out previous videos to stay up to date with the latest AI news. Thank you so much for watching. Have an amazing day and I'll see you fairly shortly. Peace out, fellas.