ai-sdk-ng
v0.1.1
Published
> [!WARNING] > This is an experimental version not ready for production.
Readme
ai-sdk-ng
[!WARNING] This is an experimental version not ready for production.
ai-sdk-ng is an Angular library that provides seamless integration with Vercel AI SDK v5 (beta) for building AI-powered apps in Angular. It offers chat, text completion, and structured output capabilities with reactive state management and type-safe schema validation.
This project was generated using Angular CLI version 20.x. The library supports Angular 16 or higher.
Features
- Chat API: Easily build interactive chat UIs powered by Vercel AI SDK v5.
- Text Completion: Generate text using LLMs (Large Language Models).
- Structured Output: Stream and validate structured JSON responses from AI APIs with Zod schema support.
- Reactive State: Built-in loading, error, and result state for Angular templates using signals.
Getting Started
Installation
npm install ai-sdk-ngUsage
Import the classes you need from the library’s public API:
import { Chat, Completion, StructuredObject } from "ai-sdk-ng";Development
Building
To build the library:
npm run buildBuild artifacts are placed in dist/ai-sdk-ng/.
Testing
Unit Tests
npm run testAdditional Resources
- Vercel AI SDK v5 (beta)
- Angular CLI Overview and Command Reference
- Zod Schema Validation
- Angular Documentation
License
Apache License, Version 2.0
