mirror of https://github.com/aliasrobotics/cai.git
update /load
This commit is contained in:
parent
b3458a3fa0
commit
9ecd81b4e9
|
|
@ -91,35 +91,19 @@
|
|||
??? question "How to know more about the CLI? /help"
|
||||
|
||||

|
||||
|
||||
??? question "How can I trace the whole execution?"
|
||||
The environment variable `CAI_TRACING` allows the user to set it to `CAI_TRACING=true` to enable tracing, or `CAI_TRACING=false` to disable it.
|
||||
When CAI is prompted by the first time, the user is provided with two paths, the execution log, and the tracing log.
|
||||
|
||||

|
||||
|
||||
??? question "Can I expand CAI capabilities using previous run logs?"
|
||||
|
||||
Absolutely! The **memory extension** allows you to use a previously sucessful runs ( the log object is stored as a **.jsonl file in the [log](cai/logs) folder** ) in a new run against the same target.
|
||||
The user is also given the path highlighted in orange as shown below.
|
||||
|
||||

|
||||
Absolutely! The **/load command** allows you to use a previously sucessful runs ( the log object is stored as a **.jsonl file in the [log](cai/logs) folder** ) in a new run against the same target.
|
||||
|
||||
How to make use of this functionality?
|
||||
|
||||
1. Run CAI against the target. Let's assume the target name is: `target001`.
|
||||
2. Get the log file path, something like: ```logs/cai_20250408_111856.jsonl```
|
||||
3. Generate the memory using any model of your preference:
|
||||
```shell
|
||||
JSONL_FILE_PATH="logs/cai_20250408_111856.jsonl" CTF_INSIDE="false" CAI_MEMORY_COLLECTION="target001" CAI_MEMORY="episodic" CAI_MODEL="claude-3-5-sonnet-20241022" python3 tools/2_jsonl_to_memory.py
|
||||
```
|
||||
3. Start cai again and select the jsonl file:
|
||||
|
||||
The script [`tools/2_jsonl_to_memory.py`](cai/tools/2_jsonl_to_memory.py) will generate a memory collection file with the most relevant steps. The quality of the memory collection will depend on the model you use.
|
||||
|
||||
4. Use the generated memory collection and execute a new run:
|
||||
```shell
|
||||
CAI_MEMORY="episodic" CAI_MODEL="gpt-4o" CAI_MEMORY_COLLECTION="target001" CAI_TRACING=false python3 cai/cli.py
|
||||
```
|
||||

|
||||
|
||||
??? question "Can I expand CAI capabilities using scripts or extra information?"
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue