Skip to content

Call agent with custom chat history #99

Answered by evalstate
FruitSwimer asked this question in Q&A
Discussion options

You must be logged in to vote

The simplest way is to use a prompt file.

You can seralize/deserialize in either an easy-to-edit text format or MPC JSON Prompt format. You can also serve them via the prompt-server (another example here).

It's pretty straightforward to save those in a document db too.

The nice thing about this approach is when the file/document gets to a certain size it's easy to trim the first few messages, or have another agent condense it.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FruitSwimer
Comment options

Answer selected by FruitSwimer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants