Tool use in conversation
To best answer your question, the LLM system uses tools as needed. Create your own tools with N8N.
Last updated
To best answer your question, the LLM system uses tools as needed. Create your own tools with N8N.
Last updated
Now in UIUC.chat, you can create your own tools for the LLM to use seamlessly during a conversation. See our demo below.
Tools are invite-only during beta. Just shoot me an email and I'll send you an onboarding invite no problem.
Email me: kvday2@illinois.edu
I'm happy to onboard anyone. No need to justify anything, no calls required.
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:
n8n's massive library of integrations (Slack, Jira, Google drive, Gmail, etc)
Cool features (drag & drop, code running, LLM abilities)
After receiving an invite, login on tools.UIUC.chat.
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.
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.
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.
Images are passed via an array of image_urls
in a json object. They must be URLs to images, no raw/binary data.
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.
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.
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.
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.
I host these endpoints on Beam.cloud, which is a phenomenal "serverless" hosting service. They're super low cost, with a truly next-level development experience. I highly recommend them.
During beta, try using the feature branch here: https://uiuc-chat-git-n8n-ui-kastandays-projects.vercel.app/
Define tools in uiuc.chat/<YOUR-PROJECT>/tools
Enable the tools you want active in your project
Start chatting, tools will be invoked as needed.