Skip to main content

Scripting Local Language Models with Ollama and the Vercel AI SDK

15m 27s
English
Paid

Course description

Create powerful local scripts based on artificial intelligence. Stop limiting yourself to simple AI chats and unlock the true potential of local language models by learning to write scripts for them. This course will guide you step by step through the process of creating a flexible and "smart" command-line tool that understands natural language, interacts with the file system, and automates complex tasks—all working entirely locally, without the cloud.

Starting with an empty TypeScript file, you will learn how to combine the capabilities of Ollama, Vercel AI SDK, and Zod to create not just a functioning, but truly intelligent script. First, you will train the model to recognize commands in ordinary phrases, then add dynamic handling of user input, access to project files, and generation of context-dependent textual output.

You will master key techniques for creating resilient and scalable tools: proper error handling, unexpected AI responses, and a convenient modular command structure. In the end, you will create an intelligent layer that allows the script to understand your intentions—even to the point of determining the required type of file for processing.

As a result, you will develop your own local AI assistant and acquire basic skills for building advanced automations on your computer.

In the course, you will learn:

  • How to create scripts for local language models using Ollama and Vercel AI SDK.
  • How to handle dynamic command line input.
  • How to use Zod schemas for validation and structuring of model output.
  • How to provide file system context using globby.
  • How to generate meaningful text based on file content.
  • How to handle errors and incorrect commands effectively.
  • How to build a modular architecture with separate files for each command.
  • How to equip the script with the ability to "guess" user intentions and file types.

Watch Online

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 7 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Scripting Local Language Models with Ollama and the Vercel AI SDK

All Course Lessons (7)

#Lesson TitleDurationAccess
1
Scripting Local Language Models with Ollama and the Vercel AI SDK Demo
02:12
2
Processing Dynamic User Input in Local AI Scripts
00:43
3
Providing File System Context to Local AI Scripts with Globby and Zod Enums
01:40
4
Generating Text with a Local AI Model Based on File Content
01:27
5
Handling Invalid Commands and AI Errors in Local Scripts
01:59
6
Creating Dynamic, File-Based Commands for Local AI Scripts
02:37
7
Dynamically Inferring File Types from User Prompts in Local AI Scripts
04:49

Unlock unlimited learning

Get instant access to all 6 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

Build Your SaaS AI Web Platform From Zero to Production

Build Your SaaS AI Web Platform From Zero to Production

Sources: Code4Startup (coderealprojects)
Discover the new trend in the world of startups and indie hackers - the creation of microservice AI-SaaS products that do more than just meet needs...
8 hours 36 minutes 2 seconds
Master and Build Large Language Models

Master and Build Large Language Models

Sources: Sebastian Raschka, Abhinav Kimothi
The best way to understand how large language models (LLM) work is to build your own. And that is exactly what you will do in this course. In this...
17 hours 15 minutes 55 seconds
Building LLMs for Production

Building LLMs for Production

Sources: Towards AI, Louis-François Bouchard
"Creating LLM for Production" is a practical guide spanning 470 pages (updated in October 2024), designed for developers and specialists...
Turbo Mode: Optimizing Productivity with AI Tools and Agents

Turbo Mode: Optimizing Productivity with AI Tools and Agents

Sources: vueschool.io, Justin Schroeder, Daniel Kelly, Garrison Snelling
Find out how to create custom AI agents and develop universal rules to enhance your productivity and address all aspects of the project.
1 hour 2 minutes 46 seconds
Build a ChatGPT Deep Research Clone with Streamlit

Build a ChatGPT Deep Research Clone with Streamlit

Sources: zerotomastery.io
Imagine that you have your own AI assistant that conducts in-depth research for you: it figures out exactly what you need, searches for information in...
1 hour 39 minutes 27 seconds