Matrix Docker Ansible eploy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

730 lines
47 KiB

  1. # SPDX-FileCopyrightText: 2024 Nikita Chernyi
  2. # SPDX-FileCopyrightText: 2024 Slavi Pantaleev
  3. # SPDX-FileCopyrightText: 2024 Suguru Hirahara
  4. #
  5. # SPDX-License-Identifier: AGPL-3.0-or-later
  6. ---
  7. # baibot is a bot exposing the power of Large Language Models to you.
  8. # Project source code URL: https://github.com/etkecc/baibot
  9. matrix_bot_baibot_enabled: true
  10. matrix_bot_baibot_container_image_self_build: false
  11. matrix_bot_baibot_container_repo: "https://github.com/etkecc/baibot.git"
  12. matrix_bot_baibot_container_repo_version: "{{ 'main' if matrix_bot_baibot_version == 'latest' else matrix_bot_baibot_version }}"
  13. matrix_bot_baibot_container_src_files_path: "{{ matrix_base_data_path }}/baibot/container-src"
  14. # renovate: datasource=docker depName=ghcr.io/etkecc/baibot
  15. matrix_bot_baibot_version: v1.25.0
  16. matrix_bot_baibot_container_image: "{{ matrix_bot_baibot_container_image_registry_prefix }}etkecc/baibot:{{ matrix_bot_baibot_version }}"
  17. matrix_bot_baibot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_baibot_container_image_self_build else matrix_bot_baibot_container_image_registry_prefix_upstream }}"
  18. matrix_bot_baibot_container_image_registry_prefix_upstream: "{{ matrix_bot_baibot_container_image_registry_prefix_upstream_default }}"
  19. matrix_bot_baibot_container_image_registry_prefix_upstream_default: "ghcr.io/"
  20. matrix_bot_baibot_base_path: "{{ matrix_base_data_path }}/baibot"
  21. matrix_bot_baibot_config_path: "{{ matrix_bot_baibot_base_path }}/config"
  22. matrix_bot_baibot_data_path: "{{ matrix_bot_baibot_base_path }}/data"
  23. matrix_bot_baibot_container_network: ""
  24. matrix_bot_baibot_container_additional_networks: "{{ matrix_bot_baibot_container_additional_networks_auto + matrix_bot_baibot_container_additional_networks_custom }}"
  25. matrix_bot_baibot_container_additional_networks_auto: []
  26. matrix_bot_baibot_container_additional_networks_custom: []
  27. # A list of extra arguments to pass to the container
  28. matrix_bot_baibot_container_extra_arguments: []
  29. # List of systemd services that matrix-bot-baibot.service depends on
  30. matrix_bot_baibot_systemd_required_services_list: "{{ matrix_bot_baibot_systemd_required_services_list_default + matrix_bot_baibot_systemd_required_services_list_auto + matrix_bot_baibot_systemd_required_services_list_custom }}"
  31. matrix_bot_baibot_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  32. matrix_bot_baibot_systemd_required_services_list_auto: []
  33. matrix_bot_baibot_systemd_required_services_list_custom: []
  34. # List of systemd services that matrix-bot-baibot.service wants
  35. matrix_bot_baibot_systemd_wanted_services_list: []
  36. # Controls the `homeserver.server_name` configuration setting.
  37. matrix_bot_baibot_config_homeserver_server_name: "{{ matrix_domain }}"
  38. # Controls the `homeserver.url` configuration setting.
  39. matrix_bot_baibot_config_homeserver_url: ""
  40. # Controls the `user.mxid_localpart` configuration setting.
  41. #
  42. # This affects the bot's username.
  43. # Changing this subsequently will require you to drop the bot's session/database (see `matrix_bot_baibot_data_path`),
  44. # so it can start fresh.
  45. matrix_bot_baibot_config_user_mxid_localpart: baibot
  46. # Authentication settings (`user.*` configuration keys).
  47. #
  48. # baibot supports 2 mutually-exclusive authentication modes.
  49. # Set EITHER:
  50. # - password authentication: `matrix_bot_baibot_config_user_password`
  51. # OR:
  52. # - access-token authentication: `matrix_bot_baibot_config_user_access_token` + `matrix_bot_baibot_config_user_device_id`
  53. #
  54. # Password authentication is recommended for most playbook-managed deployments,
  55. # because it integrates with the `matrix-user-creator` role and can auto-create
  56. # the bot account (via the `ensure-matrix-users-created` playbook tag).
  57. # This remains true even on many MAS-enabled deployments where the bot account
  58. # is local and playbook-managed.
  59. # Controls the `user.password` configuration setting.
  60. matrix_bot_baibot_config_user_password: null
  61. # Controls the `user.access_token` configuration setting.
  62. matrix_bot_baibot_config_user_access_token: null
  63. # Controls the `user.device_id` configuration setting.
  64. matrix_bot_baibot_config_user_device_id: null
  65. # Controls the `user.name` configuration setting.
  66. #
  67. # The name the bot uses as a display name and when it refers to itself.
  68. # If you leave this empty, the bot will use the default (baibot).
  69. #
  70. # Also see: `matrix_bot_baibot_config_user_mxid_localpart`
  71. matrix_bot_baibot_config_user_name: baibot
  72. # Controls the `user.avatar` configuration setting.
  73. #
  74. # An optional path to an image file to be used as a custom avatar image.
  75. # This path should be an in-container path (e.g., `/data/avatar.png`).
  76. # Any type of content type is supported, but stick to common image formats (PNG, JPG, ..) for better compatibility with various Matrix clients.
  77. #
  78. # To use a custom avatar:
  79. # - Use the auxiliary role (`aux_` variables) to upload your avatar file to the server (e.g. to {{ matrix_bot_baibot_data_path }}/avatar.png on the host),
  80. # or do it any other way (without Ansible) you prefer
  81. # - Set this variable to something like `/data/avatar.png` (the in-container path)
  82. #
  83. # Possible values:
  84. # - null or empty string: use the default baibot avatar
  85. # - "keep": don't touch the avatar, keep whatever is already set (useful if you manage the avatar via other means)
  86. # - any other value: path to a custom avatar image file (must be an in-container path like `/data/avatar.png`)
  87. matrix_bot_baibot_config_user_avatar: null
  88. # Controls the `user.encryption.recovery_passphrase` configuration setting.
  89. #
  90. # An optional passphrase to use for backing up and recovering the bot's encryption keys.
  91. # You can use any string here.
  92. #
  93. # If left empty, the recovery module will not be used and losing your session/database (see persistence)
  94. # will mean you lose access to old messages in encrypted room.
  95. #
  96. # Changing this subsequently will also cause you to lose access to old messages in encrypted rooms.
  97. # If you really need to change this:
  98. # - Set `matrix_bot_baibot_config_user_encryption_recovery_reset_allowed` to `true` and adjust the passphrase
  99. # - Remove your session file and database (see persistence)
  100. # - Restart the bot
  101. # - Then restore `matrix_bot_baibot_config_user_encryption_recovery_reset_allowed` to `false` to prevent accidental resets in the future
  102. matrix_bot_baibot_config_user_encryption_recovery_passphrase: null
  103. # Controls the `user.encryption.recovery_passphrase` configuration setting.
  104. #
  105. # An optional flag to reset the encryption recovery passphrase (see `matrix_bot_baibot_config_user_encryption_recovery_passphrase`).
  106. matrix_bot_baibot_config_user_encryption_recovery_reset_allowed: false
  107. # Controls the `command_prefix` configuration setting.
  108. # If you leave this empty, the bot will use the default (!bai).
  109. matrix_bot_baibot_config_command_prefix: "!bai"
  110. # Controls the `room.post_join_self_introduction_enabled` configuration setting.
  111. # Influences whether the bot should send an introduction message after joining a room.
  112. matrix_bot_baibot_config_room_post_join_self_introduction_enabled: true
  113. # Controls the `access.admin_patterns` configuration setting.
  114. # A space-separated list of MXID patterns which specify who is an admin.
  115. #
  116. # Example:
  117. # matrix_bot_baibot_config_access_admin_patterns:
  118. # - "@*:example.com"
  119. # - "@admin:example.net"
  120. matrix_bot_baibot_config_access_admin_patterns: "{{ [matrix_admin] if matrix_admin else [] }}"
  121. # Controls the `persistence.data_dir_path` configuration setting.
  122. #
  123. # The bot runs in a container, so this is the in-container path referring to the data directory on the host
  124. # (see `matrix_bot_baibot_data_path`).
  125. #
  126. # You generally don't need to change this.
  127. matrix_bot_baibot_config_persistence_data_dir_path: /data
  128. # Controls the `persistence.session_encryption_key` configuration setting.
  129. #
  130. # An optional secret for encrypting the bot's session data (see `matrix_bot_baibot_data_path`).
  131. # This must be 32-bytes (64 characters when HEX-encoded).
  132. # Generate it with: `openssl rand -hex 32`
  133. # Leave null or empty to avoid using encryption.
  134. # Changing this subsequently requires that you also throw away all data (see `matrix_bot_baibot_data_path`)
  135. matrix_bot_baibot_config_persistence_session_encryption_key: null
  136. # Controls the `persistence.config_encryption_key` configuration setting.
  137. #
  138. # An optional secret for encrypting bot configuration stored in Matrix's account data.
  139. # This must be 32-bytes (64 characters when HEX-encoded).
  140. # Generate it with: `openssl rand -hex 32`
  141. # Leave null or empty to avoid using encryption.
  142. # Changing this subsequently will make you lose your configuration.
  143. matrix_bot_baibot_config_persistence_config_encryption_key: null
  144. # Controls the `agents.static_definitions` configuration setting.
  145. #
  146. # There are some presets (e.g. `matrix_bot_baibot_config_agents_static_definitions_openai_*`) you can easily use to get started with a given provider.
  147. # You can also define your own agents via `matrix_bot_baibot_config_agents_static_definitions_custom`.
  148. matrix_bot_baibot_config_agents_static_definitions: "{{ matrix_bot_baibot_config_agents_static_definitions_auto + matrix_bot_baibot_config_agents_static_definitions_custom }}"
  149. matrix_bot_baibot_config_agents_static_definitions_auto: |-
  150. {{
  151. ([{
  152. 'id': matrix_bot_baibot_config_agents_static_definitions_anthropic_id,
  153. 'provider': matrix_bot_baibot_config_agents_static_definitions_anthropic_provider,
  154. 'config': matrix_bot_baibot_config_agents_static_definitions_anthropic_config,
  155. }] if matrix_bot_baibot_config_agents_static_definitions_anthropic_enabled else [])
  156. +
  157. ([{
  158. 'id': matrix_bot_baibot_config_agents_static_definitions_groq_id,
  159. 'provider': matrix_bot_baibot_config_agents_static_definitions_groq_provider,
  160. 'config': matrix_bot_baibot_config_agents_static_definitions_groq_config,
  161. }] if matrix_bot_baibot_config_agents_static_definitions_groq_enabled else [])
  162. +
  163. ([{
  164. 'id': matrix_bot_baibot_config_agents_static_definitions_mistral_id,
  165. 'provider': matrix_bot_baibot_config_agents_static_definitions_mistral_provider,
  166. 'config': matrix_bot_baibot_config_agents_static_definitions_mistral_config,
  167. }] if matrix_bot_baibot_config_agents_static_definitions_mistral_enabled else [])
  168. +
  169. ([{
  170. 'id': matrix_bot_baibot_config_agents_static_definitions_openai_id,
  171. 'provider': matrix_bot_baibot_config_agents_static_definitions_openai_provider,
  172. 'config': matrix_bot_baibot_config_agents_static_definitions_openai_config,
  173. }] if matrix_bot_baibot_config_agents_static_definitions_openai_enabled else [])
  174. +
  175. ([{
  176. 'id': matrix_bot_baibot_config_agents_static_definitions_venice_id,
  177. 'provider': matrix_bot_baibot_config_agents_static_definitions_venice_provider,
  178. 'config': matrix_bot_baibot_config_agents_static_definitions_venice_config,
  179. }] if matrix_bot_baibot_config_agents_static_definitions_venice_enabled else [])
  180. }}
  181. matrix_bot_baibot_config_agents_static_definitions_custom: []
  182. 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 of this conversation's start is: {{ baibot_conversation_start_time_utc }}.{% endraw %}"
  183. ########################################################################################
  184. # #
  185. # Anthropic agent configuration #
  186. # #
  187. ########################################################################################
  188. matrix_bot_baibot_config_agents_static_definitions_anthropic_enabled: false
  189. matrix_bot_baibot_config_agents_static_definitions_anthropic_id: anthropic
  190. matrix_bot_baibot_config_agents_static_definitions_anthropic_provider: anthropic
  191. matrix_bot_baibot_config_agents_static_definitions_anthropic_config: "{{ matrix_bot_baibot_config_agents_static_definitions_anthropic_config_yaml | from_yaml | combine(matrix_bot_baibot_config_agents_static_definitions_anthropic_config_extension, recursive=True) }}"
  192. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_yaml: "{{ lookup('template', 'templates/provider/anthropic-config.yml.j2') }}"
  193. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_extension: "{{ matrix_bot_baibot_config_agents_static_definitions_anthropic_config_extension_yaml | from_yaml if matrix_bot_baibot_config_agents_static_definitions_anthropic_config_extension_yaml | from_yaml is mapping else {} }}"
  194. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_extension_yaml: |
  195. # Your custom YAML configuration for this provider's configuration goes here.
  196. # This configuration extends the default starting configuration (`matrix_bot_baibot_config_agents_static_definitions_anthropic_config`).
  197. #
  198. # You can override individual variables from the default configuration, or introduce new ones.
  199. #
  200. # If you need something more special, you can take full control by
  201. # completely redefining `matrix_bot_baibot_config_agents_static_definitions_anthropic_config_yaml`.
  202. #
  203. # Example configuration extension follows:
  204. #
  205. # text_generation:
  206. # temperature: 3.5
  207. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_base_url: https://api.anthropic.com/v1
  208. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_api_key: ""
  209. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_enabled: true
  210. # For valid model choices, see: https://docs.claude.com/en/docs/about-claude/models/overview
  211. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_model_id: claude-sonnet-4-5-20250929
  212. # The prompt text to use (can be null or empty to not use a prompt).
  213. # See: https://huggingface.co/docs/transformers/en/tasks/prompting
  214. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
  215. # The temperature parameter controls the randomness of the generated text.
  216. # See: https://blogs.novita.ai/what-are-large-language-model-settings-temperature-top-p-and-max-tokens/#what-is-llm-temperature
  217. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_temperature: 1.0
  218. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_max_response_tokens: 8192
  219. matrix_bot_baibot_config_agents_static_definitions_anthropic_config_text_generation_max_context_tokens: 204800
  220. ########################################################################################
  221. # #
  222. # /Anthropic agent configuration #
  223. # #
  224. ########################################################################################
  225. ########################################################################################
  226. # #
  227. # Groq agent configuration #
  228. # #
  229. ########################################################################################
  230. matrix_bot_baibot_config_agents_static_definitions_groq_enabled: false
  231. matrix_bot_baibot_config_agents_static_definitions_groq_id: groq
  232. matrix_bot_baibot_config_agents_static_definitions_groq_provider: groq
  233. matrix_bot_baibot_config_agents_static_definitions_groq_config: "{{ matrix_bot_baibot_config_agents_static_definitions_groq_config_yaml | from_yaml | combine(matrix_bot_baibot_config_agents_static_definitions_groq_config_extension, recursive=True) }}"
  234. matrix_bot_baibot_config_agents_static_definitions_groq_config_yaml: "{{ lookup('template', 'templates/provider/groq-config.yml.j2') }}"
  235. matrix_bot_baibot_config_agents_static_definitions_groq_config_extension: "{{ matrix_bot_baibot_config_agents_static_definitions_groq_config_extension_yaml | from_yaml if matrix_bot_baibot_config_agents_static_definitions_groq_config_extension_yaml | from_yaml is mapping else {} }}"
  236. matrix_bot_baibot_config_agents_static_definitions_groq_config_extension_yaml: |
  237. # Your custom YAML configuration for this provider's configuration goes here.
  238. # This configuration extends the default starting configuration (`matrix_bot_baibot_config_agents_static_definitions_groq_config`).
  239. #
  240. # You can override individual variables from the default configuration, or introduce new ones.
  241. #
  242. # If you need something more special, you can take full control by
  243. # completely redefining `matrix_bot_baibot_config_agents_static_definitions_groq_config_yaml`.
  244. #
  245. # Example configuration extension follows:
  246. #
  247. # text_generation:
  248. # temperature: 3.5
  249. matrix_bot_baibot_config_agents_static_definitions_groq_config_base_url: https://api.groq.com/openai/v1
  250. matrix_bot_baibot_config_agents_static_definitions_groq_config_api_key: ""
  251. matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_enabled: true
  252. # For valid model choices, see: https://platform.groq.com/docs/models
  253. matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_model_id: ""
  254. # The prompt text to use (can be null or empty to not use a prompt).
  255. # See: https://huggingface.co/docs/transformers/en/tasks/prompting
  256. matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
  257. # The temperature parameter controls the randomness of the generated text.
  258. # See: https://blogs.novita.ai/what-are-large-language-model-settings-temperature-top-p-and-max-tokens/#what-is-llm-temperature
  259. matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_temperature: 1.0
  260. matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_max_response_tokens: 4096
  261. matrix_bot_baibot_config_agents_static_definitions_groq_config_text_generation_max_context_tokens: 131072
  262. matrix_bot_baibot_config_agents_static_definitions_groq_config_speech_to_text_enabled: true
  263. matrix_bot_baibot_config_agents_static_definitions_groq_config_speech_to_text_model_id: whisper-large-v3
  264. ########################################################################################
  265. # #
  266. # /Groq agent configuration #
  267. # #
  268. ########################################################################################
  269. ########################################################################################
  270. # #
  271. # Mistral agent configuration #
  272. # #
  273. ########################################################################################
  274. matrix_bot_baibot_config_agents_static_definitions_mistral_enabled: false
  275. matrix_bot_baibot_config_agents_static_definitions_mistral_id: mistral
  276. matrix_bot_baibot_config_agents_static_definitions_mistral_provider: mistral
  277. matrix_bot_baibot_config_agents_static_definitions_mistral_config: "{{ matrix_bot_baibot_config_agents_static_definitions_mistral_config_yaml | from_yaml | combine(matrix_bot_baibot_config_agents_static_definitions_mistral_config_extension, recursive=True) }}"
  278. matrix_bot_baibot_config_agents_static_definitions_mistral_config_yaml: "{{ lookup('template', 'templates/provider/mistral-config.yml.j2') }}"
  279. matrix_bot_baibot_config_agents_static_definitions_mistral_config_extension: "{{ matrix_bot_baibot_config_agents_static_definitions_mistral_config_extension_yaml | from_yaml if matrix_bot_baibot_config_agents_static_definitions_mistral_config_extension_yaml | from_yaml is mapping else {} }}"
  280. matrix_bot_baibot_config_agents_static_definitions_mistral_config_extension_yaml: |
  281. # Your custom YAML configuration for this provider's configuration goes here.
  282. # This configuration extends the default starting configuration (`matrix_bot_baibot_config_agents_static_definitions_mistral_config`).
  283. #
  284. # You can override individual variables from the default configuration, or introduce new ones.
  285. #
  286. # If you need something more special, you can take full control by
  287. # completely redefining `matrix_bot_baibot_config_agents_static_definitions_mistral_config_yaml`.
  288. #
  289. # Example configuration extension follows:
  290. #
  291. # text_generation:
  292. # temperature: 3.5
  293. matrix_bot_baibot_config_agents_static_definitions_mistral_config_base_url: https://api.mistral.ai/v1
  294. matrix_bot_baibot_config_agents_static_definitions_mistral_config_api_key: ""
  295. matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_enabled: true
  296. # For valid model choices, see: https://platform.mistral.com/docs/models
  297. matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_model_id: mistral-large-latest
  298. # The prompt text to use (can be null or empty to not use a prompt).
  299. # See: https://huggingface.co/docs/transformers/en/tasks/prompting
  300. matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
  301. # The temperature parameter controls the randomness of the generated text.
  302. # See: https://blogs.novita.ai/what-are-large-language-model-settings-temperature-top-p-and-max-tokens/#what-is-llm-temperature
  303. matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_temperature: 1.0
  304. matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_max_response_tokens: 4096
  305. matrix_bot_baibot_config_agents_static_definitions_mistral_config_text_generation_max_context_tokens: 128000
  306. ########################################################################################
  307. # #
  308. # /Mistral agent configuration #
  309. # #
  310. ########################################################################################
  311. ########################################################################################
  312. # #
  313. # OpenAI agent configuration #
  314. # #
  315. ########################################################################################
  316. matrix_bot_baibot_config_agents_static_definitions_openai_enabled: false
  317. matrix_bot_baibot_config_agents_static_definitions_openai_id: openai
  318. matrix_bot_baibot_config_agents_static_definitions_openai_provider: openai
  319. matrix_bot_baibot_config_agents_static_definitions_openai_config: "{{ matrix_bot_baibot_config_agents_static_definitions_openai_config_yaml | from_yaml | combine(matrix_bot_baibot_config_agents_static_definitions_openai_config_extension, recursive=True) }}"
  320. matrix_bot_baibot_config_agents_static_definitions_openai_config_yaml: "{{ lookup('template', 'templates/provider/openai-config.yml.j2') }}"
  321. matrix_bot_baibot_config_agents_static_definitions_openai_config_extension: "{{ matrix_bot_baibot_config_agents_static_definitions_openai_config_extension_yaml | from_yaml if matrix_bot_baibot_config_agents_static_definitions_openai_config_extension_yaml | from_yaml is mapping else {} }}"
  322. matrix_bot_baibot_config_agents_static_definitions_openai_config_extension_yaml: |
  323. # Your custom YAML configuration for this provider's configuration goes here.
  324. # This configuration extends the default starting configuration (`matrix_bot_baibot_config_agents_static_definitions_openai_config`).
  325. #
  326. # You can override individual variables from the default configuration, or introduce new ones.
  327. #
  328. # If you need something more special, you can take full control by
  329. # completely redefining `matrix_bot_baibot_config_agents_static_definitions_openai_config_yaml`.
  330. #
  331. # Example configuration extension follows:
  332. #
  333. # text_generation:
  334. # temperature: 3.5
  335. matrix_bot_baibot_config_agents_static_definitions_openai_config_base_url: https://api.openai.com/v1
  336. # The API key is intentionally not required. Some OpenAI-compatible APIs do not require a key.
  337. matrix_bot_baibot_config_agents_static_definitions_openai_config_api_key: ""
  338. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_enabled: true
  339. # For valid model choices, see: https://platform.openai.com/docs/models
  340. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_model_id: gpt-5.4
  341. # The prompt text to use (can be null or empty to not use a prompt).
  342. # See: https://huggingface.co/docs/transformers/en/tasks/prompting
  343. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
  344. # The temperature parameter controls the randomness of the generated text.
  345. # See: https://blogs.novita.ai/what-are-large-language-model-settings-temperature-top-p-and-max-tokens/#what-is-llm-temperature
  346. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_temperature: 1.0
  347. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_max_response_tokens: ~
  348. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_max_completion_tokens: 128000
  349. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_max_context_tokens: 400000
  350. # Built-in tools configuration (OpenAI only).
  351. # These tools extend the model's capabilities but are disabled by default following upstream defaults.
  352. # See: https://github.com/etkecc/baibot/blob/main/docs/features.md#%EF%B8%8F-built-in-tools-openai-only
  353. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_tools_web_search: false
  354. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_tools_code_interpreter: false
  355. matrix_bot_baibot_config_agents_static_definitions_openai_config_speech_to_text_enabled: true
  356. matrix_bot_baibot_config_agents_static_definitions_openai_config_speech_to_text_model_id: whisper-1
  357. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_to_speech_enabled: true
  358. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_to_speech_model_id: tts-1-hd
  359. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_to_speech_voice: onyx
  360. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_to_speech_speed: 1.0
  361. matrix_bot_baibot_config_agents_static_definitions_openai_config_text_to_speech_response_format: opus
  362. matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_enabled: true
  363. matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_model_id: gpt-image-1.5
  364. matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_style: null
  365. matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_size: null
  366. matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generation_quality: null
  367. ########################################################################################
  368. # #
  369. # /OpenAI agent configuration #
  370. # #
  371. ########################################################################################
  372. ########################################################################################
  373. # #
  374. # Venice agent configuration #
  375. # #
  376. ########################################################################################
  377. matrix_bot_baibot_config_agents_static_definitions_venice_enabled: false
  378. matrix_bot_baibot_config_agents_static_definitions_venice_id: venice
  379. matrix_bot_baibot_config_agents_static_definitions_venice_provider: venice
  380. matrix_bot_baibot_config_agents_static_definitions_venice_config: "{{ matrix_bot_baibot_config_agents_static_definitions_venice_config_yaml | from_yaml | combine(matrix_bot_baibot_config_agents_static_definitions_venice_config_extension, recursive=True) }}"
  381. matrix_bot_baibot_config_agents_static_definitions_venice_config_yaml: "{{ lookup('template', 'templates/provider/venice-config.yml.j2') }}"
  382. matrix_bot_baibot_config_agents_static_definitions_venice_config_extension: "{{ matrix_bot_baibot_config_agents_static_definitions_venice_config_extension_yaml | from_yaml if matrix_bot_baibot_config_agents_static_definitions_venice_config_extension_yaml | from_yaml is mapping else {} }}"
  383. matrix_bot_baibot_config_agents_static_definitions_venice_config_extension_yaml: |
  384. # Your custom YAML configuration for this provider's configuration goes here.
  385. # This configuration extends the default starting configuration (`matrix_bot_baibot_config_agents_static_definitions_venice_config`).
  386. #
  387. # You can override individual variables from the default configuration, or introduce new ones.
  388. #
  389. # If you need something more special, you can take full control by
  390. # completely redefining `matrix_bot_baibot_config_agents_static_definitions_venice_config_yaml`.
  391. #
  392. # The fully-commented sample config (every Venice knob, with explanations) lives at:
  393. # https://github.com/etkecc/baibot/blob/main/docs/sample-provider-configs/venice.yml
  394. #
  395. # Example configuration extension follows:
  396. #
  397. # text_generation:
  398. # venice_parameters:
  399. # enable_web_search: "off"
  400. matrix_bot_baibot_config_agents_static_definitions_venice_config_base_url: https://api.venice.ai/api/v1
  401. matrix_bot_baibot_config_agents_static_definitions_venice_config_api_key: ""
  402. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_enabled: true
  403. # For valid model choices, see: https://docs.venice.ai/models/overview
  404. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_model_id: kimi-k2-5
  405. # The prompt text to use (can be null or empty to not use a prompt).
  406. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
  407. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_temperature: 1.0
  408. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_max_response_tokens: 4096
  409. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_max_context_tokens: 128000
  410. # How long Venice keeps the prompt prefix cached: "default", "extended", or "24h".
  411. # "24h" makes a long, stable system prompt cheap across a day of conversations.
  412. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_prompt_cache_retention: 24h
  413. # The optional top-level sampling and reasoning knobs below default to null, meaning the knob is
  414. # omitted from the request and Venice applies its own server-side default. Set a value to override.
  415. # Nucleus sampling, 0.0-1.0 (an alternative to temperature).
  416. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_top_p: ~
  417. # Penalize tokens by how often they have already appeared, -2.0-2.0.
  418. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_frequency_penalty: ~
  419. # Penalize tokens that have appeared at all, -2.0-2.0.
  420. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_presence_penalty: ~
  421. # Penalize repetition; values above 1.0 discourage repeats.
  422. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_repetition_penalty: ~
  423. # Reasoning budget for models that support it: "low", "medium", or "high".
  424. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_reasoning_effort: ~
  425. # Append the model's reasoning below the answer as a collapsible "Reasoning" block (folded by default).
  426. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_show_reasoning: ~
  427. # Venice-specific request parameters (the `venice_parameters` bag). Each non-null knob below is sent;
  428. # a null knob is omitted, so Venice applies its own default. Omitting a knob is NOT the same as
  429. # setting it to `false` (which actively sends `false`).
  430. # Web search: "auto" (model decides), "on" (always), or "off".
  431. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_search: auto
  432. # Strip <think></think> blocks from reasoning models so the user sees only the answer.
  433. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_strip_thinking_response: true
  434. # Run in TEE-only mode (works across all models) instead of end-to-end-encrypted inference (only
  435. # some models support it). TEE is still zero-retention private; this default keeps every model usable.
  436. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_e2ee: false
  437. # Render web-search sources as readable citations in the reply.
  438. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_citations: ~
  439. # Let web search read full page content, not just snippets.
  440. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_scraping: ~
  441. # Prepend Venice's own system prompt alongside yours.
  442. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_include_venice_system_prompt: ~
  443. # Include search results inline in the streamed response.
  444. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_include_search_results_in_stream: ~
  445. # Return search results as documents rather than inline text.
  446. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_return_search_results_as_documents: ~
  447. # Allow web search to query X (Twitter).
  448. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_x_search: ~
  449. # Disable the model's thinking phase entirely.
  450. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_disable_thinking: ~
  451. # Response verbosity for models that support it: "low", "medium", or "high".
  452. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_verbosity: ~
  453. # Use a public Venice character by its slug.
  454. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_character_slug: ~
  455. matrix_bot_baibot_config_agents_static_definitions_venice_config_speech_to_text_enabled: true
  456. matrix_bot_baibot_config_agents_static_definitions_venice_config_speech_to_text_model_id: nvidia/parakeet-tdt-0.6b-v3
  457. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_enabled: true
  458. # Other models include tts-qwen3-1-7b, tts-xai-v1, tts-elevenlabs-turbo-v2-5, tts-minimax-speech-02-hd.
  459. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_model_id: tts-kokoro
  460. # Voices are model-specific. Kokoro uses af_*/am_*/bf_*/bm_* (e.g. af_sky, am_adam). You can also pass
  461. # a cloned-voice handle (vv_<id>). An incompatible voice returns an error.
  462. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_voice: af_sky
  463. # Output audio format: mp3, opus, aac, flac, wav, or pcm. mp3 is the broadest Matrix-client fit.
  464. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_response_format: mp3
  465. # The optional knobs below default to null (omitted). Set a value to override Venice's default.
  466. # Playback speed, 0.25-4.0 (1.0 is normal).
  467. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_speed: ~
  468. # A style prompt steering emotion/delivery (e.g. "Excited and energetic."). Only Qwen 3 TTS uses it.
  469. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_prompt: ~
  470. # Sampling temperature, 0.0-2.0. Only Qwen 3 / Orpheus / Chatterbox HD use it.
  471. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_temperature: ~
  472. # Nucleus sampling, 0.0-1.0. Only Qwen 3 TTS uses it.
  473. matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_top_p: ~
  474. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_enabled: true
  475. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_model_id: chroma
  476. # The optional generation knobs below default to null (omitted). Set a value to override Venice's
  477. # default. Omitting a knob is NOT the same as setting it: an omitted knob lets Venice apply its own
  478. # default, a set value is sent verbatim.
  479. # A description of what should NOT appear in the image.
  480. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_negative_prompt: ~
  481. # CFG scale, 0-20. Higher values make the image adhere more closely to the prompt.
  482. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_cfg_scale: ~
  483. # Number of inference steps. Model-specific; some models ignore it.
  484. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_steps: ~
  485. # A named style to apply (e.g. "3D Model"). See Venice's image-styles reference.
  486. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_style_preset: ~
  487. # Random seed, -999999999-999999999. Fix it for reproducible results; omit for a random seed.
  488. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_seed: ~
  489. # Blur images classified as adult content. Defaults to true.
  490. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_safe_mode: ~
  491. # Hide the Venice watermark. Venice may ignore this for certain generated content. Defaults to false.
  492. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_hide_watermark: ~
  493. # Output format: jpeg, png, or webp. webp is smallest; png is highest-quality. Defaults to webp.
  494. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_format: ~
  495. # Image dimensions in pixels, each 1-1280. Default 1024x1024.
  496. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_width: ~
  497. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_height: ~
  498. # Aspect ratio (used by certain models, e.g. Nano Banana): "1:1", "16:9". An alternative to width/height.
  499. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_aspect_ratio: ~
  500. # Resolution tier (used by certain models): "1K", "2K", "4K".
  501. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_resolution: ~
  502. # Output quality for supported models (e.g. GPT Image 2): low, medium, high. Higher can cost more.
  503. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_quality: ~
  504. # Lora strength, 0-100. Only applies if the model uses additional Loras.
  505. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_lora_strength: ~
  506. # Embed the generation prompt into the image's EXIF metadata. Defaults to false.
  507. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_embed_exif_metadata: ~
  508. # Let the model pull the latest info from the web for the image. Model-specific; costs extra credits.
  509. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_enable_web_search: ~
  510. # Image editing shares this image_generation config block; only the model differs.
  511. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_model_id: firered-image-edit
  512. # The optional edit knobs below default to null (omitted). Set a value to override Venice's default.
  513. # Output format: jpeg, png, or webp. When omitted, Venice infers it (PNG at 1K, JPEG at 2K/4K).
  514. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_output_format: ~
  515. # Aspect ratio of the result: auto, 1:1, 3:2, 16:9, 21:9, 9:16, 2:3, 3:4, 4:5 (model-specific).
  516. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_aspect_ratio: ~
  517. # Resolution tier: 1K, 2K, 4K (model-specific). Defaults to 1K.
  518. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_resolution: ~
  519. # Blur images classified as adult content. Defaults to true.
  520. matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_safe_mode: ~
  521. ########################################################################################
  522. # #
  523. # /Venice agent configuration #
  524. # #
  525. ########################################################################################
  526. # Controls the `initial_global_config.handler.catch_all` configuration setting.
  527. #
  528. # This is an initial global configuration setting.
  529. # It only affects the first run of the bot. Configuration is later managed at runtime.
  530. matrix_bot_baibot_config_initial_global_config_handler_catch_all: null
  531. # Controls the `initial_global_config.handler.text_generation` configuration setting.
  532. #
  533. # This is an initial global configuration setting.
  534. # It only affects the first run of the bot. Configuration is later managed at runtime.
  535. matrix_bot_baibot_config_initial_global_config_handler_text_generation: null
  536. # Controls the `initial_global_config.handler.text_to_speech` configuration setting.
  537. #
  538. # This is an initial global configuration setting.
  539. # It only affects the first run of the bot. Configuration is later managed at runtime.
  540. matrix_bot_baibot_config_initial_global_config_handler_text_to_speech: null
  541. # Controls the `initial_global_config.handler.speech_to_text` configuration setting.
  542. #
  543. # This is an initial global configuration setting.
  544. # It only affects the first run of the bot. Configuration is later managed at runtime.
  545. matrix_bot_baibot_config_initial_global_config_handler_speech_to_text: null
  546. # Controls the `initial_global_config.handler.image_generation` configuration setting.
  547. #
  548. # This is an initial global configuration setting.
  549. # It only affects the first run of the bot. Configuration is later managed at runtime.
  550. matrix_bot_baibot_config_initial_global_config_handler_image_generation: null
  551. # Controls the `initial_global_config.user_patterns` configuration setting.
  552. #
  553. # A space-separated list of MXID patterns which specify who can use the bot.
  554. # By default, we let anyone on the homeserver use the bot.
  555. #
  556. # This is an initial global configuration setting.
  557. # It only affects the first run of the bot. Configuration is later managed at runtime.
  558. matrix_bot_baibot_config_initial_global_config_user_patterns:
  559. - "@*:{{ matrix_bot_baibot_config_homeserver_server_name }}"
  560. # Controls the `logging` configuration setting.
  561. #
  562. # This could take a single value (e.g. `warn`) to affect all tracing targets,
  563. # or individual libraries (e.g. `mxlink`, `baibot`) can be configured independently of the main level.
  564. #
  565. # Below, we configure the logging level for:
  566. # - the bot (baibot), via `matrix_bot_baibot_config_logging_level_baibot`
  567. # - the bot framework that the bot is based on (mxlink), via `matrix_bot_baibot_config_logging_level_mxlink`
  568. # - everything else (external libraries), via `matrix_bot_baibot_config_logging_level_other_libs`
  569. #
  570. # Valid values for each level are: `trace`, `debug`, `info`, `warn`, `error`.
  571. # Learn more here: https://stackoverflow.com/a/73735203
  572. matrix_bot_baibot_config_logging: "{{ matrix_bot_baibot_config_logging_level_other_libs }},mxlink={{ matrix_bot_baibot_config_logging_level_mxlink }},baibot={{ matrix_bot_baibot_config_logging_level_baibot }}"
  573. # Adjust the logging level for other libraries used by the bot.
  574. matrix_bot_baibot_config_logging_level_other_libs: warn
  575. # Affects the logging level of the bot framework (mxlink) that the bot is based on.
  576. # Related to `matrix_bot_baibot_config_logging`
  577. matrix_bot_baibot_config_logging_level_mxlink: info
  578. # Affects the logging level of the bot itself.
  579. # Related to `matrix_bot_baibot_config_logging`
  580. matrix_bot_baibot_config_logging_level_baibot: info
  581. # Holds the final baibot configuration (a combination of the default and its extension).
  582. # You most likely don't need to touch this variable. Instead, see `matrix_bot_baibot_configuration_yaml` or `matrix_bot_baibot_configuration_extension_yaml`.
  583. matrix_bot_baibot_configuration: "{{ matrix_bot_baibot_configuration_yaml | from_yaml | combine(matrix_bot_baibot_configuration_extension, recursive=True) }}"
  584. # Default baibot configuration template which covers the generic use case.
  585. # You can customize it by controlling the various variables inside it.
  586. #
  587. # For a more advanced customization, you can extend the default (see `matrix_bot_baibot_configuration_extension_yaml`)
  588. # or completely replace this variable with your own template.
  589. matrix_bot_baibot_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  590. matrix_bot_baibot_configuration_extension_yaml: |
  591. # Your custom YAML configuration for baibot goes here.
  592. # This configuration extends the default starting configuration (`matrix_bot_baibot_configuration_yaml`).
  593. #
  594. # You can override individual variables from the default configuration, or introduce new ones.
  595. #
  596. # If you need something more special, you can take full control by
  597. # completely redefining `matrix_bot_baibot_configuration_yaml`.
  598. #
  599. # Example configuration extension follows:
  600. #
  601. # user:
  602. # password: something
  603. matrix_bot_baibot_configuration_extension: "{{ matrix_bot_baibot_configuration_extension_yaml | from_yaml if matrix_bot_baibot_configuration_extension_yaml | from_yaml is mapping else {} }}"
  604. # Additional environment variables to pass to the baibot container.
  605. #
  606. # Environment variables take priority over settings in the configuration file.
  607. #
  608. # Example:
  609. # matrix_bot_baibot_environment_variables_extension: |
  610. # BAIBOT_USER_PASSWORD=password
  611. matrix_bot_baibot_environment_variables_extension: ''
  612. # matrix_bot_baibot_restart_necessary controls whether the service
  613. # will be restarted (when true) or merely started (when false) by the
  614. # systemd service manager role (when conditional restart is enabled).
  615. #
  616. # This value is automatically computed during installation based on whether
  617. # any configuration files, the systemd service file, or the container image changed.
  618. # The default of `false` means "no restart needed" — appropriate when the role's
  619. # installation tasks haven't run (e.g., due to --tags skipping them).
  620. matrix_bot_baibot_restart_necessary: false