@getzep/zep-js

中文文档
2.0.2发布于 2024/09/26TypeScriptCommonJS近 30 天下载 48.6万

Zep: Fast, scalable building blocks for production LLM apps

原始使用文档
文档目录5 节
  1. Recall, understand, and extract data from chat histories. P…
  2. What is Zep? 💬
  3. Installation Notes
  4. How Zep works
  5. Using langchain zep classes with zep-cloud :

npm ci CodeQL fern shield

Zep Logo

Zep: Long-Term Memory for ‍AI Assistants.

Recall, understand, and extract data from chat histories. Power personalized AI experiences.


Documentation | LangChain | Discord
www.getzep.com

What is Zep? 💬

Zep is a long-term memory service for AI Assistant apps. With Zep, you can provide AI assistants with the ability to recall past conversations, no matter how distant, while also reducing hallucinations, latency, and cost.

Installation Notes

Main branch contains the latest version of zep-cloud sdk. You can install it by running:

npm install @getzep/zep-cloud

Open Source Compatible SDK is available in the oss branch, where you can also find Open Source compatible examples. You can install it by running:

npm install @getzep/zep-js

How Zep works

Zep persists and recalls chat histories, and automatically generates summaries and other artifacts from these chat histories. It also embeds messages and summaries, enabling you to search Zep for relevant context from past conversations. Zep does all of this asynchronously, ensuring these operations don't impact your user's chat experience. Data is persisted to database, allowing you to scale out when growth demands.

Zep also provides a simple, easy to use abstraction for document vector search called Document Collections. This is designed to complement Zep's core memory features, but is not designed to be a general purpose vector database.

Zep allows you to be more intentional about constructing your prompt:

  1. automatically adding a few recent messages, with the number customized for your app;
  2. a summary of recent conversations prior to the messages above;
  3. and/or contextually relevant summaries or messages surfaced from the entire chat session.
  4. and/or relevant Business data from Zep Document Collections.

Zep Cloud offers:

  • Fact Extraction: Automatically build fact tables from conversations, without having to define a data schema upfront.
  • Dialog Classification: Instantly and accurately classify chat dialog. Understand user intent and emotion, segment users, and more. Route chains based on semantic context, and trigger events.
  • Structured Data Extraction: Quickly extract business data from chat conversations using a schema you define. Understand what your Assistant should ask for next in order to complete its task.

You will also need to provide a Zep Project API key to your zep client. You can find out about zep projects in our cloud docs

Using langchain zep classes with zep-cloud:

zep-cloud sdk comes with ZepChatMessageHistory, ZepVectorStore and ZepMemory classes that are compatible with Langchain's JS expression language

In order to use these classes in your application, you need to make sure that you have langchain package installed:

npm install langchain@^0.1.23

You can import these classes in the following way:

import { ZepChatMessageHistory, ZepVectorStore, ZepMemory } from "@getzep/zep-cloud/langchain"

版本与发布记录

@getzep/zep-js 共发布 31 个版本,首次发布于 2023/05/22;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.0.2latest2024/09/262 年前
2.0.12024/09/262 年前
2.0.02024/09/252 年前
2.1.0-rc.1preview2024/05/032 年前
2.0.1-rc.12024/05/032 年前
2.0.0-rc.5next2024/04/302 年前

关于 @getzep/zep-js 的常见问题

@getzep/zep-js 是什么?

Zep: Fast, scalable building blocks for production LLM apps

如何安装 @getzep/zep-js?

在项目目录运行 npm install @getzep/zep-js,或使用 pnpm add / yarn add / bun add。

@getzep/zep-js 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@getzep/zep-js 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@getzep/zep-js 可以商用吗?

@getzep/zep-js 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@getzep/zep-js 的下载量有多少?

根据 npm 官方下载统计,@getzep/zep-js 在 2026/10/17 – 2026/11/15 这 30 天内被下载 486,309 次,日均约 16,210 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@getzep/zep-js 还在维护吗?

最新版本 2.0.2 发布于 2024/09/26(2 年前);至今共发布 31 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/05/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。