Show HN:Rust Agent 的 AI-SDK

Show HN:Rust Agent 的 AI-SDK

Hacker News·

一款名為 AISDK 的開源、與供應商無關的 Rust 函式庫已發布,其靈感來自 Vercel AI SDK。該函式庫旨在透過提供與大型語言模型 (LLM) 互動的類型安全介面,並支援各種後端和 UI 框架,來簡化 AI 應用程式的開發。

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

To see all available qualifiers, see our documentation.

The AI Toolkit for Rust, inspired by the Vercel AI SDK.

License

lazy-hq/aisdk

Folders and files

Latest commit

History

Repository files navigation

AISDK

Image

Image

Image

Image

Image

An open-source, provider-agnostic Rust library for building AI-powered applications, inspired by the Vercel AI SDK. It provides a type-safe interface for interacting with Large Language Models (LLMs) and offers seamless support for Rust backend frameworks as well as popular UI frameworks like React, Solid, Vue, Svelte, and more.

To learn more about how to use the AI SDK, check out our Documentation and API Reference.

Installation

Usage

Enable Providers of your choice such as OpenAI, Anthropic, Google, and more

Example with OpenAI provider

Basic Text Generation

Agents

Defining a Tool

Use the #[tool] macro to expose a Rust function as a callable tool.

Using Tools in an Agent

Register tools with an agent so the model can call them during its reasoning loop.

Structured Output

Define your target output format.

Use the schema attribute to infer the structure of the output.

Prompts

The AISDK prompt feature provides a powerful, file-based template system for managing AI prompts using the Tera template engine. It allows you to create reusable prompt templates with variable substitution, conditionals, loops, and template inclusion. See Examples for more template examples. Enable with cargo add aisdk --features prompt

Roadmap

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

Licensed under the MIT License. See LICENSE for details.

About

The AI Toolkit for Rust, inspired by the Vercel AI SDK.

Resources

License

Contributing

Uh oh!

There was an error while loading. Please reload this page.

Stars

Watchers

Forks

Releases

  4

Contributors

  3

Uh oh!

There was an error while loading. Please reload this page.

Languages

Footer

Footer navigation

Hacker News

相關文章

  1. 展示 HN:Rust 的 AI SDK

    4 個月前

  2. Show HN:ADK-Studio – 使用 Rust 建構 AI Agent 工作流程的視覺化建置工具

    4 個月前

  3. Show HN:為使用AI程式碼助手的開發者提供的兩本Rust書籍

    3 個月前

  4. Show HN:Radkit – 使用 Rust 建構可靠的 AI 代理

    5 個月前

  5. Show HN:收集開發者 AI 工具

    3 個月前