Skip to content

Commit

Permalink
Pin baibot to v1.1.1 and add default prompt for all statically-define…
Browse files Browse the repository at this point in the history
…d agents

The playbook did not use to define a prompt for statically-defined
agents.

Since prompt variables support landed in v1.1.0
(see etkecc/baibot@2a5a2d6)
it makes sense to make use of it for a better out-of-the-box experience
(see etkecc/baibot#10).
  • Loading branch information
spantaleev authored and venimus committed Oct 8, 2024
1 parent 2375461 commit d0603d2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
24 changes: 22 additions & 2 deletions docs/configuring-playbook-bot-baibot.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ matrix_bot_baibot_config_agents_static_definitions_anthropic_config_api_key: "YO
# If you'd like to use another text-generation agent, uncomment and adjust:
# matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_model_id: claude-3-5-sonnet-20240620

# The playbook defines a default prompt for all statically-defined agents.
# You can adjust it in the `matrix_bot_baibot_config_agents_static_definitions_prompt` variable,
# or you can adjust it below only for the Anthropic agent.
# matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"

# See `defaults/main.yml` in the baibot role for more configuration options.
```

Expand All @@ -176,6 +181,11 @@ matrix_bot_baibot_config_agents_static_definitions_groq_config_api_key: "YOUR_AP
# Specify the text-generation agent you'd like to use
matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_model_id: "llama3-70b-8192"

# The playbook defines a default prompt for all statically-defined agents.
# You can adjust it in the `matrix_bot_baibot_config_agents_static_definitions_prompt` variable,
# or you can adjust it below only for the Groq agent.
# matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"

# Uncomment and adjust if you're not happy with these speech-to-text defaults:
#
# matrix_bot_baibot_config_agents_static_definitions_groq_config_speech_to_text_enabled: true
Expand All @@ -202,6 +212,11 @@ matrix_bot_baibot_config_agents_static_definitions_mistral_enabled: true

matrix_bot_baibot_config_agents_static_definitions_mistral_config_api_key: "YOUR_API_KEY_HERE"

# The playbook defines a default prompt for all statically-defined agents.
# You can adjust it in the `matrix_bot_baibot_config_agents_static_definitions_prompt` variable,
# or you can adjust it below only for the Mistral agent.
# matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"

# Uncomment and adjust if you're not happy with these defaults:
# matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_model_id: mistral-large-latest

Expand All @@ -228,6 +243,11 @@ matrix_bot_baibot_config_agents_static_definitions_openai_enabled: true

matrix_bot_baibot_config_agents_static_definitions_openai_config_api_key: "YOUR_API_KEY_HERE"

# The playbook defines a default prompt for all statically-defined agents.
# You can adjust it in the `matrix_bot_baibot_config_agents_static_definitions_prompt` variable,
# or you can adjust it below only for the OpenAI agent.
# matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"

# If you'd like to use another text-generation agent, uncomment and adjust:
# matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_model_id: gpt-4o

Expand Down Expand Up @@ -273,7 +293,7 @@ matrix_bot_baibot_config_agents_static_definitions_custom:
api_key: "YOUR_API_KEY_HERE"
text_generation:
model_id: gpt-3.5-turbo-0125
prompt: You are a brief, but helpful bot.
prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
temperature: 1.0
max_response_tokens: 4096
max_context_tokens: 16385
Expand All @@ -290,7 +310,7 @@ matrix_bot_baibot_config_agents_static_definitions_custom:
api_key: ""
text_generation:
model_id: "llama3.1:8b"
prompt: "You are an assistant based on the Llama3.1:8b model. Be brief in your responses."
prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
temperature: 1.0
max_response_tokens: 4096
max_context_tokens: 128000
Expand Down
15 changes: 8 additions & 7 deletions roles/custom/matrix-bot-baibot/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ matrix_bot_baibot_container_repo_version: "{{ 'main' if matrix_bot_baibot_versio
matrix_bot_baibot_container_src_files_path: "{{ matrix_base_data_path }}/baibot/container-src"

# renovate: datasource=docker depName=ghcr.io/etkecc/baibot
matrix_bot_baibot_version: latest
matrix_bot_baibot_version: v1.1.1
matrix_bot_baibot_container_image: "{{ matrix_bot_baibot_container_image_name_prefix }}etkecc/baibot:{{ matrix_bot_baibot_version }}"
matrix_bot_baibot_container_image_name_prefix: "{{ 'localhost/' if matrix_bot_baibot_container_image_self_build else 'ghcr.io/' }}"
matrix_bot_baibot_container_image_force_pull: "{{ matrix_bot_baibot_container_image.endswith(':latest') }}"
Expand Down Expand Up @@ -155,6 +155,7 @@ matrix_bot_baibot_config_agents_static_definitions_auto: |-
}}
matrix_bot_baibot_config_agents_static_definitions_custom: []

matrix_bot_baibot_config_agents_static_definitions_prompt: "{% raw %}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 }}.{% endraw %}"

########################################################################################
# #
Expand Down Expand Up @@ -195,7 +196,7 @@ matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generat
matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_model_id: claude-3-5-sonnet-20240620
# The prompt text to use (can be null or empty to not use a prompt).
# See: https://huggingface.co/docs/transformers/en/tasks/prompting
matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_prompt: null
matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
# The temperature parameter controls the randomness of the generated text.
# See: https://blogs.novita.ai/what-are-large-language-model-settings-temperature-top-p-and-max-tokens/#what-is-llm-temperature
matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_temperature: 1.0
Expand Down Expand Up @@ -248,7 +249,7 @@ matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_e
matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_model_id: ""
# The prompt text to use (can be null or empty to not use a prompt).
# See: https://huggingface.co/docs/transformers/en/tasks/prompting
matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_prompt: null
matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
# The temperature parameter controls the randomness of the generated text.
# See: https://blogs.novita.ai/what-are-large-language-model-settings-temperature-top-p-and-max-tokens/#what-is-llm-temperature
matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_temperature: 1.0
Expand All @@ -267,7 +268,7 @@ matrix_bot_baibot_config_agents_static_definitions_groq_config_speech_to_text_mo

########################################################################################
# #
# Mistral agent configuration #
# Mistral agent configuration #
# #
########################################################################################

Expand Down Expand Up @@ -304,7 +305,7 @@ matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generatio
matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_model_id: mistral-large-latest
# The prompt text to use (can be null or empty to not use a prompt).
# See: https://huggingface.co/docs/transformers/en/tasks/prompting
matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_prompt: null
matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
# The temperature parameter controls the randomness of the generated text.
# See: https://blogs.novita.ai/what-are-large-language-model-settings-temperature-top-p-and-max-tokens/#what-is-llm-temperature
matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_temperature: 1.0
Expand All @@ -313,7 +314,7 @@ matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generatio

########################################################################################
# #
# /Mistral agent configuration #
# /Mistral agent configuration #
# #
########################################################################################

Expand Down Expand Up @@ -358,7 +359,7 @@ matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_model_id: gpt-4o
# The prompt text to use (can be null or empty to not use a prompt).
# See: https://huggingface.co/docs/transformers/en/tasks/prompting
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_prompt: null
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
# The temperature parameter controls the randomness of the generated text.
# See: https://blogs.novita.ai/what-are-large-language-model-settings-temperature-top-p-and-max-tokens/#what-is-llm-temperature
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_temperature: 1.0
Expand Down

0 comments on commit d0603d2

Please sign in to comment.