Skip to content

Commit

Permalink
Add SavingMemories variant
Browse files Browse the repository at this point in the history
  • Loading branch information
Cormanz committed Jun 2, 2023
1 parent e94aae0 commit 02b4c00
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "smartgpt"
version = "0.1.8"
version = "0.1.9"
edition = "2021"
license = "MIT"
description = "A crate that provides LLMs with the ability to complete complex tasks using plugins."
Expand Down
1 change: 1 addition & 0 deletions src/auto/agents/worker/methodical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pub fn add_memories(
agent: &mut AgentInfo,
listen_to_update: &mut impl FnMut(&Update) -> Result<(), Box<dyn Error>>
) -> Result<(), Box<dyn Error>> {
listen_to_update(&Update::StaticAgent(StaticUpdate::SavingMemories()))?;
agent.llm.message_history.push(Message::User(
SUMMARIZE_MEMORIES.fill(NoData)?
));
Expand Down
2 changes: 2 additions & 0 deletions src/auto/agents/worker/updates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ pub enum StaticUpdate {
SelectedAsset(String),
#[serde(rename = "added asset")]
AddedAsset(NamedAsset),
#[serde(rename = "saving memories")]
SavingMemories(),
#[serde(rename = "added memories")]
SavedMemories(Memories)
}
Expand Down

0 comments on commit 02b4c00

Please sign in to comment.