Skip to content

Commit d4f4af3

Browse files
committed
fix: removed --full-dump, now dumping everything by default
1 parent 6112d4b commit d4f4af3

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ You can find more tasklet examples in the `examples` folder, feel free to send a
128128

129129
The main idea is giving the model a set of functions to perform operations and add more context to its own system prompt, in a structured way. Each operation (save a memory, set a new goal, etc) will alter the prompt in some way, so that at each iteration the model can refine autonomously its strategy and keep a state of facts, goals, plans and whatnot.
130130

131-
If you want to observe this (basically the debug mode of Nerve), run your tasklet by adding the following additional arguments:
131+
If you want to observe this (basically the debug mode of Nerve), run your tasklet by adding the following additional argument:
132132

133133
```sh
134-
nerve -G ... -T whatever-tasklet --save-to state.txt --full-dump
134+
nerve -G ... -T whatever-tasklet --save-to state.txt
135135
```
136136

137137
The agent save to disk its internal state at each iteration for you to observe.

src/cli.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,9 @@ pub(crate) struct Args {
4949
/// Maximum number of steps to complete the task or 0 for no limit.
5050
#[arg(long, default_value_t = 0)]
5151
pub max_iterations: usize,
52-
/// At every step, save the dynamic system prompt contents to this file.
52+
/// At every step, save the current system prompt and state data to this file.
5353
#[arg(long)]
5454
pub save_to: Option<String>,
55-
/// Dump the system prompt and the entire chat history to file.
56-
#[arg(long)]
57-
pub full_dump: bool,
5855
/// Print the documentation of the available action namespaces.
5956
#[arg(long)]
6057
pub generate_doc: bool,

src/ui/text.rs

+10-14
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,16 @@ pub(crate) async fn consume_events(args: cli::Args, mut events_rx: Receiver) {
1313
}
1414
Event::StateUpdate(opts) => {
1515
if let Some(prompt_path) = &args.save_to {
16-
let data = if args.full_dump {
17-
format!(
18-
"[SYSTEM PROMPT]\n\n{}\n\n[PROMPT]\n\n{}\n\n[CHAT]\n\n{}",
19-
&opts.system_prompt,
20-
&opts.prompt,
21-
opts.history
22-
.iter()
23-
.map(|m| m.to_string())
24-
.collect::<Vec<String>>()
25-
.join("\n")
26-
)
27-
} else {
28-
opts.system_prompt.to_string()
29-
};
16+
let data = format!(
17+
"[SYSTEM PROMPT]\n\n{}\n\n[PROMPT]\n\n{}\n\n[CHAT]\n\n{}",
18+
&opts.system_prompt,
19+
&opts.prompt,
20+
opts.history
21+
.iter()
22+
.map(|m| m.to_string())
23+
.collect::<Vec<String>>()
24+
.join("\n")
25+
);
3026

3127
if let Err(e) = std::fs::write(prompt_path, data) {
3228
log::error!("error writing {}: {:?}", prompt_path, e);

0 commit comments

Comments
 (0)