langchain/libs/cli
Lincoln Stein c314222796
Add a conversation memory that combines a (optionally persistent) vectorstore history with a token buffer (#22155)
**langchain: ConversationVectorStoreTokenBufferMemory**

-**Description:** This PR adds ConversationVectorStoreTokenBufferMemory.
It is similar in concept to ConversationSummaryBufferMemory. It
maintains an in-memory buffer of messages up to a preset token limit.
After the limit is hit timestamped messages are written into a
vectorstore retriever rather than into a summary. The user's prompt is
then used to retrieve relevant fragments of the previous conversation.
By persisting the vectorstore, one can maintain memory from session to
session.
-**Issue:** n/a
-**Dependencies:** none
-**Twitter handle:** Please no!!!
- [X] **Add tests and docs**: I looked to see how the unit tests were
written for the other ConversationMemory modules, but couldn't find
anything other than a test for successful import. I need to know whether
you are using pytest.mock or another fixture to simulate the LLM and
vectorstore. In addition, I would like guidance on where to place the
documentation. Should it be a notebook file in docs/docs?

- [X] **Lint and test**: I am seeing some linting errors from a couple
of modules unrelated to this PR.

If no one reviews your PR within a few days, please @-mention one of
baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.

---------

Co-authored-by: Lincoln Stein <lstein@gmail.com>
Co-authored-by: isaac hershenson <ihershenson@hmc.edu>
2024-06-25 20:17:10 -07:00
..
langchain_cli Add a conversation memory that combines a (optionally persistent) vectorstore history with a token buffer (#22155) 2024-06-25 20:17:10 -07:00
scripts cli[minor]: Add ipynb support, add text_splitters (#20963) 2024-04-29 10:11:21 -04:00
tests infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
.gitignore infra: make .gitignore consistent with standard python gitignore (#16828) 2024-02-12 19:43:41 -08:00
CONTRIBUTING.md Adds version CLI command (#12619) 2023-10-31 14:50:04 -07:00
DOCS.md Adds version CLI command (#12619) 2023-10-31 14:50:04 -07:00
LICENSE Library Licenses (#13300) 2023-11-28 17:34:27 -08:00
Makefile CLI CI 2 (#12387) 2023-10-26 17:01:31 -07:00
poetry.lock cli: release 0.0.22 (#21507) 2024-05-09 21:45:20 +00:00
poetry.toml Use an in-project virtualenv in the CLI package. (#12678) 2023-10-31 14:51:24 -07:00
pyproject.toml cli[patch]: Release 0.0.25 (#22876) 2024-06-14 02:31:04 +00:00
README.md template updates (#12646) 2023-10-31 09:13:58 -07:00

langchain-cli

This package implements the official CLI for LangChain. Right now, it is most useful for getting started with LangChain Templates!

CLI Docs

LangServe Templates Quickstart