Skip to main content

AI: Coding Assistant

Build, debug, and deploy UbiFunctions faster with a contextual assistant that understands your code, your function, and the Ubidots environment.

Sergio M avatar
Written by Sergio M
Updated this week

Building UbiFunctions often means juggling between your code editor, docs, and even support to answer questions or fix errors. That context switching adds friction, breaks focus, and slows down development. The new AI Assistant for UbiFunctions is here to change that by offering real-time, contextual help right inside the Functions editor.

Whether you need help debugging a script, generating a sample payload, or deploying a function with confidence, the assistant is trained to guide you every step of the way. Each function gets its own dedicated chat thread, so your conversations stay relevant and persistent. Ask questions, get answers, and take action; all without leaving your workspace.

Requirements

1. What's the AI Assistant?

The AI Assistant is a contextual chat panel embedded directly into each UbiFunction's code editor. Each function has its own dedicated chat thread, allowing conversations to stay focused on that specific function’s logic, history, and structure. You can open or close the assistant at any time, and past exchanges are preserved to maintain continuity.

When permitted, the assistant can read the function’s code to provide tailored suggestions or propose improvements. These suggestions can be accepted and applied directly to the code. It’s trained with Ubidots-specific knowledge, supported libraries, and both Python and Node.js, giving it the foundation to provide relevant, technically accurate responses for a wide range of scripting tasks.

1.1. Usage and billing

The AI Assistant is available on Trial, Industrial, and Enterprise plans. Each plan includes 1,000 AI credits per month at no additional cost. This monthly allowance acts as a soft limit, and you’ll receive a notification as you approach it.

How consumption works

  • Usage is measured in AI credits.

  • 1,000 credits are roughly equivalent to 4 million characters in English. Characters included both in your prompt as well as those in the assistant's answer are counted.

Overages and limits

  • Credits are billed in blocks of 1,000 credits.

  • Cost per block: $2 USD.

  • Charges apply only when monthly usage exceeds the included 1,000 credits.

2. How to use the functions AI Assistant?

  1. Go to “dev center” ⟶ “functions”.

  2. Click on the function you want to work on or create a new one.

  3. Once in the function editor page, click on the “AI Assistant” button located on the upper right corner.

  4. You can now ask the assistant questions about your function to improve it or create one from scratch.

  5. By clicking on the trash can icon, you can clear the chat. This effectively resets the conversation, making the conversation context disappear.

Note: To ensure stable responses, avoid sending prompts longer than 2,000 characters. Extremely long inputs may cause errors or incomplete outputs.

Did this answer your question?