Hello everyone, this is Professor Pattern and in the next couple of videos we'll be covering Open Web UI functions, pipelines, tools, and all of those things in between. We'll start off with this video by covering tools. Now, if you are an advanced Open Web UI user, the only thing that you need to know is that a tool is a Python script that your large language model can execute. That's it. You can skip to the second part, which is the implementation step. If you're a complete beginner and had no idea what I just said, then stick around for the next part.
So let's imagine a scenario where you are a boss and you have an assistant. Now, if you ask your assistant a question something like, "Hey, can you grab me the transcript from this video?" Now your assistant is going to click on this video and they'll see that, okay, well this is actually a 10-minute video by Professor Patterns. Now I love listening to Professor Patterns, but do I have to actually manually type out every single word from this video? Well, that's one way in which you could do this. Another way is by simply creating a Python script. The goal of the script is to first go to the video, then it's to fetch the text from the video and then print out the transcript. So the next time you ask this question like, "Hey, can you grab the transcript from this video?" your assistant is going to be able to simply execute the script which will fetch the video and then print out all of those things from the transcript.
Now this script that your assistant has created is what we in Open Web UI call a tool. So the goal of this tool, which is get_transcript, is to go fetch the video, grab the transcript, and print out the transcript. Similar to this tool, we also have a bunch of different tools like get_transcript, get_stock_prices, send out automatic emails, summarize meetings. We have a tool to convert image to text, um, to create Jira tickets from meeting notes. All of these are examples of tools.
And the goal here is that any single time that you ask a question like, "Hey, grab me the transcript from this video," your assistant knows that, okay, well looks like in this case the tool that I need to execute is get_transcript. Or if your question is something like, "Hey, send an email to my wife wishing her for Valentine's Day," your assistant knows that the tool to execute is send_automatic_emails.
Now in this scenario, your assistant isn't obviously your assistant, it's a large language model. So for example, this could be something like ChatGPT or DeepSeek or Grok or Mistral or the Llama 3 model. Now what you're doing is you're providing all of these LLMs access to these tools. So when you ask a question like, "Hey, send an email to my wife wishing her for Valentine's Day," the large language model is going to be able to execute the tool for sending automatic emails.
Now, here is what it's going to look like on the Open Web UI platform. The first time you'll say something like, "Hey, can you transcribe this video?" and ChatGPT 4 is going to come back to you and say, "Look, sorry, I can't really transcribe that video, but you can try turning on captions." That's not really helpful. So what we'll do is we'll provide it access to the tool. Now obviously, I didn't write this tool by myself. We have an entire community which I'm going to talk about here in a second, but this is a tool or a script that I provided, and the only thing that I'll need to do is to activate it, which is basically to say enable this tool. So next time if I was to ask a question like, "Hey, transcribe this video," it knows that this tool is available so it executes this tool or this script, and then based on that, it's now able to actually transcribe this video. Right? "Hello everyone, this is Professor Patterns..." and in this video, you get the idea. So this is how a tool works.
A tool is a Python script that your large language model can execute. So what does this actually look like on the Open Web UI interface? Well, from your homepage, you'll select Workspace and then select Tools. Now here you can see that I have this YouTube Transcript provider tool that I've downloaded from the community page. And the goal of this tool is to go to the YouTube video, grab the transcript, and then simply print it out for me.
Now to make sure that the tool is running, I need to click on this plus icon and then enable it. Once I do that, I can ask a question something like, "Grab me the transcript from this video." And you can see here that when the tool is running, it should be blinking here. So when I ask it this question, it's going to be able to go to this video and then based on that, it will start printing out the transcript.
Now, if you go over to openwebui.com, I'm going to share a link to this in the description. You can go to the new Tools section. So if I select see all, you can see that I have a bunch of different tools that are available here. There are some for email, there's one for Reddit, there's a calculator tool, a transcribe tool, a WolframAlpha tool, a 11 Labs tool. Um, let's try one. Let's say that for example, I wanted to try the Enhanced Web Scrape tool, right? This looks interesting.
So to actually get this tool, it's pretty easy. All you will do is simply select Get and then here it's going to say "Import to Open Web UI." Now you want to make sure that Open WebUI is running or it's not going to work. Once I select this, it's going to automatically show up here on Open Web UI.
Now something that you want to be careful about is you want to make sure that the tools that you're downloading are going to have at least a couple of people who have used it in the past because these are going to be executable files. So something that you might want to do is, this one's fine because it's got 7,000-something downloads, but just as an extra step of precaution, I would just copy and paste the tool, put it into ChatGPT and just be like, "Hey, is this safe?" or something or, "Is this going to send my data out somewhere?" Just to be sure, you never know. So here, once you do this, you will be able to see your tool available here, and I'm going to simply select Save. And again, you'll get this warning, right? So tools have a function calling systems that allow code execution. So I'm going to select Confirm.
And let's say that for example, one of the tools that you downloaded has an API key that is necessary. Well to do that, you'll simply select the Valves section. And over here we can see that it is asking for an API key, but it is optional, so it allows for a higher rate limit when you're scraping, but you don't need to actually have this, so that's great. There's also another sort of thing for citation, so the default citation is enabled.
Let's just say that we disabled citation, right? We can do that over here. Do we want to disable caching? I don't know, let's just leave it as the default value and then I'm going to select Save. So for example, if you have other tools that do require an API, this is where you would put that API in.
So let's go here to the new chat and I need to make sure that the tool for enhanced web search is active. And then we'll say something like, "Transcribe this page." And when I send this message, you'll see here that it's going to scrape that website, and then based on that, it's going to tell us what this page is about. And that's pretty much it.
Now all of this is fine, right? Like we know that we can access tools from the community, but what if you had a very specific purpose, right, and you wanted to create your own tool? How do you do that? Well, you don't need to be a developer. All you'll do is just go to the Open Web UI documentation page, copy this entire whatever documentation is available on tools, go here and paste it. Next, I'm going to copy an example tool that works, like the enhanced web script, right? We tried that, we know that this works. So I'm going to go in here, I'm going to say, "This is an example of a tool that works," and I'm going to paste it. And then I'm also going to say, "This is another example of a tool that works," and then I'm going to give it the YouTube transcript provider. So let's go in here and then paste it.
Now I can ask it to do whatever I want, right? So let's just say that I want it to create a tool for me. So I'm going to start typing, "Hey, can you help create a new tool for me that fetches the top five posts from the Wall Street Bets subreddit?" So when I execute this, it not only does it have information on the tools documentation, it also has some example code from other people's tool that does work. So here it actually wrote this entire script for me, and I'd love to actually try it out to see if this works. So I'm going to go here and then I'm going to copy this entire script and then let's go to settings or Workspace, Tools, and let's create this new tool. So let's paste this entire code that we were provided and then let's give this tool a name. So WallStreetBets and the tool description: "Grabs top five posts from WSB." So first I need to see if this actually works. I'm going to select Save and Confirm. So it says, "Code formatted successfully." Let's see if this actually works.
So do I have any Valves that I need to put in? So Client ID, Client Secret, and then Reddit User Agent. Let's leave these as default for now because I'm not sure what those things are. And let's try to activate or run this tool. Of course I put a typo in that. "What are the top five posts today?" So what we need to do is see if this works or not. So it says, "Reddit API credentials not configured." So it means that we need to provide it some credentials. So if I wanted to, I could go to api.reddit.com and then go in here and then register to get the API, but it seems like this is a whole thing.
So instead of doing this, let me just get a different or let me create a different tool. Let's just say that I wanted to create a different tool that doesn't use an API call anywhere, which now it makes sense what those Valves were, which I just completely had ignored at the time. So here it's saying, "Here's a simple tool that performs text analysis without requiring any API calls." So it analyzes the text and then provides statistics like word count, character count, most common words, and some more metrics. So yeah, not the most glamorous tool, I will say, but I mean it's a good use case, right? So for example, if you had something that you wanted to try out, you can always go in here and then have it kind of write that out for you. Looks like it is actually removing the stop words and then building some sort of a response. So I'm really excited to see if this actually works. So let's wait for it to get done.
And then I'm going to simply select copy. Now here let's go to Workspace, Tools, and let's create this tool, WordCounter, and then I'm going to paste it. And this tool counts words. Let's hit Save and confirm. Only alphanumeric characters allowed in the title. Let's hit Save and then confirm. It says tool created successfully. Uh, there are no Valves, so that is awesome. So let's go back here to our new chat, enable this tool which is WordCounter, and say or just type a sentence like, "How many" or "Statistics on this sentence: This is a sentence." I don't know if that's going to work or not, but let's try it out. This analysis complete, and then here are the detailed statistics. So it gave us the basic statistics, reading analysis, and then word frequency. So we know that this actually works because this is the format that the tool is actually working in. So if you go to Workspace, select Tools and then the WordCounter tool, we can see here that it's in that same sort of format, right? Text analysis results. So we know that this sort of pipeline works.
Conclusion and Key Takeaways
Um, if you have some use cases, please feel free to post those in the comment section. Um, I'd love to try some out. You know, this is really the workflow. You don't need to be a developer not to create these tools, create these functions. So I encourage you to go out, maybe try creating some of these tools, but also be careful because remember that these are executable Python files.
Now that's pretty much it for this video. Thank you all for tuning in. Hopefully, it was a little bit helpful, and I'll see you in the next one. Goodbye.