Below is an example of a tool that can be used with the OpenWebUI LLM. You must understand how the below code works and create a new well-documented tool that provides the desired functionality based on the new user requirement. Functions in the Tools
class are exposed to LLM for tool selection. Functions in the Utils
class are not exposed to LLM and are meant to be used as development helper functions. The EventEmitter
class is used to emit events to the OpenWebUI. The Valves
class is used to define the user configuration parameters for the tool. The some_functionality_exposed_to_LLM
function is an example of a function that is exposed to the LLM. The some_helper_function_not_exposed_to_LLM
function is an example of a function that is not exposed to the LLM. The main
function is an example of how to run the tool locally. The main
function is not exposed to the LLM. Each function in Tools
represents a new exposed function to the LLM. There can be many functions in Tools
available for LLM f
""" | |
title: Get Information on Docker Containers | |
author: KK | |
funding_url: https://github.com/bearlike | |
version: 0.1.0 | |
license: MIT | |
""" | |
from datetime import timedelta, datetime | |
from typing import Callable, Any, Tuple |
""" | |
title: Explore Torrents managed by my qBittorrent Instance. Tool for OpenWebUI | |
author: KK | |
funding_url: https://github.com/bearlike | |
version: 0.1.3 | |
license: MIT | |
""" | |
from qbittorrent import Client | |
from pydantic import BaseModel, Field |
This tutorial will guide you through setting up a Raspberry Pi 4 as a WiFi Access Point (AP) and blocking specific DNS servers, using 8.8.8.8
as an example.
You're setting up a Raspberry Pi 4 as a WiFi Access Point (AP) to gain more control over your network, specifically to address limitations in your current router. The primary goal is to block specific DNS servers, like 8.8.8.8, which some devices, such as the Fire TV, use by default. By doing so, you aim to prevent these devices from bypassing your preferred DNS settings, which you've configured to block ads using Pi-Hole. This setup ensures a consistent ad-free experience across all devices connected to the AP, even if they have hardcoded DNS settings.
- Raspberry Pi 4 (tested) or similar.
As far as I know (and in my opinion), focusing on these below potential inputs should be a good starting point for engineering language models for generating workflow files, not exclusive to
GitHub Actions [CI/CD]
:
- Workflow Name: A name for the workflow file, eg., "CI", "test", "deploy".
- On Events: What (kind of) events trigger the workflow. This could be any events such as 'push', 'pull_request', or a on complex structures, it could be an API call with payloads. But for now, focusing on simpler events, should get the job done.
- Environment Variables: Any environment variables that the workflow needs.
- Jobs: A list of jobs that the workflow should run. Imagine, complete a serives of sub-tasks to compete a bigger task. Each job is roughly an object should atleast contain the below:
- Job Name
cd /AppData/nextcloud | |
# Download latest version | |
sudo wget https://download.nextcloud.com/server/releases/nextcloud-<VERSION>.zip -O /AppData/nextcloud/nextcloud.zip | |
sudo unzip /AppData/nextcloud/nextcloud.zip | |
# Stopping container | |
docker stop nextcloud-app-1 | |
# Backup old files, move apps and old configurations. |
version: '3' | |
services: | |
mariadb: | |
image: mariadb:10.7.3-focal | |
restart: always | |
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW | |
volumes: | |
- /AppData/nextcloud/mariadb:/var/lib/mysql | |
environment: |
Systemd has its own logging system called the journal, and the log files are stored in /var/log/journal
.
sudo journalctl --disk-usage
- Active journal files will be marked as archived, so that they are never written to in future.
version: "3.9" | |
services: | |
jupyter: | |
image: jupyter/minimal-notebook | |
container_name: jupyter | |
ports: | |
- "81:8888" | |
volumes: | |
- /home/kk/jupyter/notebooks:/home/jovyan/ |