rig-extra

Crates.iorig-extra
lib.rsrig-extra
version0.18.0
created_at2025-06-27 16:59:32.391602+00
updated_at2026-01-24 14:08:18.120518+00
description基于rig-core的简单扩展
homepage
repositoryhttps://github.com/launcher-rs/rig-extra-project
max_upload_size
id1728981
size211,934
(cyberdoors)

documentation

README

rig-extra

基于rig-core的简单扩展

扩展功能

  • 添加 Z智谱 bigmodel provider, 【注意: 虽然rig-core中智谱使用 openai provider有问题,但是可以使用anthropic provider,也可以使用本crate的 bigmodel provider】
    • anthropic provider 使用示例,注意必须设置 max_tokens
           let client = providers::anthropic::ClientBuilder::new("xxxxxxxxxxxxxxxxxxx")
              .base_url("https://open.bigmodel.cn/api/anthropic")
              .build()?;
          let agent = client.agent("glm-4.5-flash")
              // .preamble("你是一个ai助手")
              .max_tokens(10000)
              .build();
      
      
  • 添加随机agent
  • 添加失败重试功能
  • ...
Commit count: 75

cargo fmt