Add support for prompt variables (bot name, date/time, model id)

Fixes https://github.com/etkecc/baibot/issues/10

This also includes them in the default prompts (for newly-created agents),
so that people can get a better experience out of the box.
This commit is contained in:
Slavi Pantaleev
2024-09-21 14:05:19 +00:00
parent 0ee663ee92
commit 2a5a2d6a4d
26 changed files with 218 additions and 66 deletions

10
Cargo.lock generated
View File

@@ -303,6 +303,7 @@ dependencies = [
"anyhow",
"async-openai 0.24.0",
"base64 0.22.1",
"chrono",
"etke_openai_api_rust",
"matrix-sdk",
"mxidwc",
@@ -506,6 +507,15 @@ dependencies = [
"zeroize",
]
[[package]]
name = "chrono"
version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
"num-traits",
]
[[package]]
name = "cipher"
version = "0.4.4"