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

View File

@@ -73,7 +73,7 @@ agents:
# api_key: ""
# text_generation:
# model_id: gpt-4o-2024-08-06
# prompt: You are a brief, but helpful bot.
# prompt: "You are a brief, but helpful bot called {{ baibot_name }} powered by the {{ baibot_model_id }} model. The date/time now is: {{ baibot_now_utc }}."
# temperature: 1.0
# max_response_tokens: 16384
# max_context_tokens: 128000
@@ -97,7 +97,7 @@ agents:
# api_key: null
# text_generation:
# model_id: gpt-4
# prompt: You are a brief, but helpful bot.
# prompt: "You are a brief, but helpful bot called {{ baibot_name }} powered by the {{ baibot_model_id }} model. The date/time now is: {{ baibot_now_utc }}."
# temperature: 1.0
# max_response_tokens: 16384
# max_context_tokens: 128000