npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@re-ai/volc-knowledge

v0.1.1

Published

火山引擎知识库接口接入SDK

Readme

@re-ai/volc-knowledge

火山引擎知识库接口接入SDK

安装

npm install @re-ai/volc-knowledge

环境变量

  • REAI_VOLC_ACCESS_KEY_ID=xxxxxx // 火山引擎AK
  • REAI_VOLC_SECRET_KEY=xxxx // 火山引擎SK
  • REAI_VOLC_REGION=cn-beijing // 火山引擎地域

功能特性

  • 知识库管理(创建/更新/删除/查询/检索/聊天)
  • 文档管理(添加/更新/删除/查询/元数据更新)
  • 切片管理(添加/更新/删除/查询/重排)
  • 重排功能(基于模型的搜索结果优化)

快速开始

import { ReAIVolcKnowledge } from '@re-ai/volc-knowledge';

// 知识库API示例
const knowledgeInfo = await ReAIVolcKnowledge.doRequest<InfoKnowledgeResponse>({
  endpoint: '/api/knowledge/collection/info',
  method: 'POST',
  body: {
    name: 'reai_test'
  }
});

// 文档API示例
const docList = await ReAIVolcKnowledge.doRequest<ListDocumentResponse>({
  endpoint: '/api/knowledge/doc/list',
  method: 'POST',
  body: {
    collection_name:'reai_test',
    project: '',
    offset: 0,
    limit: 100,
    return_token_usage: true
  }
});

// 切片API示例
const updatedSlice = await ReAIVolcKnowledge.doRequest<any>({
  endpoint: '/api/knowledge/point/update',
  method: 'POST',
  body: {
    collection_name: 'reai_test',
    project: '',
    point_id: 'reai_123456-0',
    content: 'test content'
  }
});

// 搜索API示例
const searchResults = await ReAIVolcKnowledge.doRequest<SearchKnowledgeResponse>({
  endpoint: '/api/knowledge/collection/search_knowledge',
  method: 'POST',
  body: {
    name: 'reai_test',
    project: '',
    query: '问题'
  }
});

参考文档

开发

# 安装依赖
npm install

# 构建
npm run build

# 运行测试
npm test

贡献

欢迎提交Pull Request。请确保遵循以下规范:

  • 代码风格符合项目规范
  • 提交信息遵循Conventional Commits
  • 新增功能需包含单元测试

许可证

MIT