UIUC.chat Documentation
UIUC.chat Main Page
  • Quick start
  • FAQs
  • Features
    • Tool use in conversation
    • Retrieval Methods
    • Web Crawling Details
    • Bulk Export Documents or Conversation History
    • Duplication in Ingested Documents
  • CropWizard
    • CropWizard Documents
    • Pest Detection Tool
    • CropWizard Document License Information
  • API
    • API Keys
    • Endpoints
  • Technical
    • System Architecture
  • Developers
    • Developer Quickstart
Powered by GitBook
On this page
  • Tools demo
  • Get access
  • N8n to easily define tools!
  • Usage - Write your own tool
  • Inputs
  • Text Outputs
  • Using Images in tools
  • Image Inputs
  • Image Outputs
  • Example tool using images
  • Recommended patterns
  • Development

Was this helpful?

  1. Features

Tool use in conversation

To best answer your question, the LLM system uses tools as needed. Create your own tools with N8N.

PreviousFAQsNextRetrieval Methods

Last updated 9 days ago

Was this helpful?

Now in UIUC.chat, you can create your own tools for the LLM to use seamlessly during a conversation. See our demo below.

Tools demo

Get access

Tools are invite-only during beta. Just shoot me an email and I'll send you an onboarding invite no problem.

Email me: rohan13@illinois.edu

I'm happy to onboard anyone. No need to justify anything, no calls required.

N8n to easily define tools!

To make it as easy as possible for you to create your own tools, we self-host n8n a visual workflow builder. We chose n8n after an intense study of the market because of:

Usage - Write your own tool

Tools can take text or images as input and text or images as output. These modalities are supported by current OpenAI models, maybe audio is coming soon.

Inputs

All tools MUST start with a n8n Form Trigger. Use this to define the inputs to your tool.

The AI will use the Form Title, Form Description and the Form Fields to decide when to use your tool, so make those as descriptive as possible so the AI will know how to best use your tool.

Text Outputs

No explicit return is necessary because we use the output of your last node as the return value of the tool. This works seamlessly across all the nodes offered by n8n.

Using Images in tools

Images are passed via an array of image_urls in a json object. They must be URLs to images, no raw/binary data.

{
   "image_urls": ["url","url","https://bucket.r2.cloudflare.com/img-path"],
   "other-useful-text": "These images depict the circle of life in the savanna."
}

Image Inputs

To take an image as input, put image_urls as a field in your n8n Form Trigger (shown below).

If you're using code, you'll have to parse this image_urls text into a JSON array. This is required because n8n doesn't allow JSON inputs, so we use a text input and have to parse the JSON data manually.

image_urls: List[str] = post_body.get('image_urls', []) # grab data from POST body

if image_urls and isinstance(image_urls, str):
  image_urls = json.loads(image_urls)
print(f"Parsed image URLs: {image_urls}")

Image Outputs

Your final node must return a JSON object that contains a top-level key "image_urls". You may return as many images as you'd like. They must be URLs to images, no raw/binary data.

You can return images + other text. That's fine and encouraged! Your tool can output arbitrary JSON data. Just the image_urls field is specially handled.

{
   "image_urls": ["url","url"],
   "other-useful-text": "These images depict the circle of life in the savanna.",
   "animals_detected": [
      "tigers": 5,
      "antelope": 1
   ]
}

Example tool using images

There's just two nodes: first capture input params, then call a POST endpoint hosted on Beam's serverless infra.

Step 1: Capture the input params. We just need the image_urls field.

Step 2: call a POST endpoint hosted on Beam. Auth is handled by an Authorization Header. The body uses the values from the last node as an input. No explicit return is necessary because we use the output of your last node as the return value of the tool. This works seamlessly across all the nodes offered by n8n.

Recommended patterns

In our experience, we like defining arbitrary python functions and run those as tools. Many of our tools look like a single n8n Form Trigger -> HTTP request to our python code.

Development

  1. Define tools in uiuc.chat/<YOUR-PROJECT>/tools

  2. Enable the tools you want active in your project

  3. Start chatting, tools will be invoked as needed.

n8n's (Slack, Jira, Google drive, Gmail, etc)

Library of

I like

(drag & drop, code running, LLM abilities)

After receiving an invite, login on .

I host these endpoints on , which is a . They're super low cost, with a truly next-level development experience. I highly recommend them.

During beta, try using the feature branch here:

massive library of integrations
creative & helpful templates
Talk to your SQLite database with a LangChain AI Agent
Cool features
tools.UIUC.chat
Beam.cloud
phenomenal "serverless" hosting service
https://uiuc-chat-git-n8n-ui-kastandays-projects.vercel.app/
ALL tools must start with a n8n Form Trigger
You can have both required and optional input parameters. You can have as many parameters as you like.
image_urls as an input in a n8n Form Trigger.
n8n form node with only image_urls as input.
HTTP
Call any HTTP endpoint you'd like!
The concept of "tool use." The LLM parses a user input and determines if any of the available tools are relevant. If so, the AI generates the input params and then our code manually invokes the tool requested by the LLM. Finally, the output is sent back to the LLM to generate a final answer consider the tool output. .
Image source