Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@re-ai/tag
是一个强大的rag服务,提供高效的文档管理、向量数据库操作和集合处理功能。
此包是专为需要在本地环境中处理大量数据的应用程序设计,支持多种数据操作。
使用 npm 安装:
npm install @re-ai/rag
import { ReAIVector } from '@re-ai/rag';
const service = ReAIVector.getService(ServiceTypes.TENCENT_CLOUD_VECTOR)
特别说明:若创建AI库,需要第二个参数传入: true,其他相关操作,也传入第二个参数: true
// 示例:创建数据库
service.database().create({ /* 数据库配置 */ }, isAI: true);
// 示例:列出所有数据库
service.database().list();
// 示例:删除数据库
service.database().drop({ /* 数据库配置 */ });
// 示例:创建集合
service.collection().create({ /* 集合配置 */ });
// 示例:获取集合描述
service.collection().describe({ /* 指定集合 */ });
// 示例:列出集合
service.collection().list();
// 示例:删除集合
service.collection().drop({ /* 指定集合 */ });
// 示例:删除所有文档
service.collection().truncate({ /* 集合配置 */ });
// 示例:插入文档
service.document().upsert({ /* 数据 */ });
// 示例:查询文档
service.document().query({ /* 查询条件 */ });
// 示例:向量搜索
service.document().search({ /* 查询条件 */ });
// 示例:删除文档
service.document().delete({ /* 查询条件 */ });
// 更新文档
service.document().update({ /* 查询条件 */ });
// AI库特有操作,上传文件
service.document().upload({ /* 数据 */ });
import { ReAIFilter } from '@re-ai/rag';
const str = ReAIFilter.buildWhereClause({
name: '张三',
})
export { ReAIVector, ReAIEmbedding } from "@re-ai/rag"
const e = ReAIEmbedding.getAPI(EmbeddingAPIType.OLLAMA, {
model: "milkey/gte:large-zh-f16"
})
e.getEmbeddings(["你好", "天气好"]).then((res) => {
console.log(res)
})
欢迎通过 GitHub 提交问题或请求,以帮助我们改进 @re-ai/rag
。
此项目遵循 MIT 许可证。有关更多详细信息,请查看 LICENSE 文件。
FAQs
ReAI RAG,向量数据库,EMBEDDING,图谱
The npm package @re-ai/rag receives a total of 0 weekly downloads. As such, @re-ai/rag popularity was classified as not popular.
We found that @re-ai/rag demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.