diff --git a/CHANGELOG.md b/CHANGELOG.md index ce3f395c4..13e44aa2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# 2026-06-28 + +## baibot now supports Venice, our recommended provider + +[baibot](./docs/configuring-playbook-bot-baibot.md) now ships a preset for the [Venice](./docs/configuring-playbook-bot-baibot.md#venice) provider, and it's the one we recommend. It's the most capable provider baibot supports (text generation with vision, file inputs and web search, speech-to-text, text-to-speech, and image generation and editing), and the only one that runs inference with no logging and no training on your data. + +Enabling it takes a preset toggle and an API key: + +```yaml +matrix_bot_baibot_config_agents_static_definitions_venice_enabled: true + +matrix_bot_baibot_config_agents_static_definitions_venice_config_api_key: "YOUR_API_KEY_HERE" +``` + +[OpenAI](https://openai.com/) and baibot's other providers remain fully supported. To get started, see the [Setting up baibot](./docs/configuring-playbook-bot-baibot.md#venice) documentation page. + # 2026-06-24 ## Support for bridging to iMessage via RustPush diff --git a/docs/configuring-playbook-bot-baibot.md b/docs/configuring-playbook-bot-baibot.md index 829563ec7..be536e4db 100644 --- a/docs/configuring-playbook-bot-baibot.md +++ b/docs/configuring-playbook-bot-baibot.md @@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later 🤖 [baibot](https://github.com/etkecc/baibot) (pronounced bye-bot) is a [Matrix](https://matrix.org/) bot developed by [etke.cc](https://etke.cc/) that exposes the power of [AI](https://en.wikipedia.org/wiki/Artificial_intelligence) / [Large Language Models](https://en.wikipedia.org/wiki/Large_language_model) to you. 🤖 -It supports [OpenAI](https://openai.com/)'s [ChatGPT](https://openai.com/blog/chatgpt/) models, as many well as other [☁️ providers](https://github.com/etkecc/baibot/blob/main/docs/providers.md). +It supports many [☁️ providers](https://github.com/etkecc/baibot/blob/main/docs/providers.md), including the privacy-first [Venice](#venice) we recommend, [OpenAI](https://openai.com/)'s [ChatGPT](https://openai.com/blog/chatgpt/) models, and more. It's designed as a more private and [✨ featureful](https://github.com/etkecc/baibot/?tab=readme-ov-file#-features) alternative to [matrix-chatgpt-bot](./configuring-playbook-bot-chatgpt.md). See the [baibot](https://github.com/etkecc/baibot) project and its documentation for more information. @@ -159,7 +159,38 @@ Agents defined statically and those created dynamically (via chat) are named dif Depending on your propensity for [GitOps](https://en.wikipedia.org/wiki/DevOps#GitOps), you may prefer to define agents statically via Ansible, or you may wish to do it dynamically via chat. -Before proceeding, we recommend reading the upstream documentation on [How to choose a provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#how-to-choose-a-provider). In short, it's probably best to go with [OpenAI](#openai). +Before proceeding, we recommend reading the upstream documentation on [How to choose a provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#how-to-choose-a-provider) for a side-by-side of what each one can do. In short: we recommend [Venice](#venice), the most capable provider baibot supports and the only one that keeps no logs and trains on nothing. If you'd rather start with the most widely-used option, [OpenAI](#openai) is a solid, well-supported choice too. + +#### Venice + +[Venice](https://venice.ai/chat?ref=kpXDe6) _(ref link with a $10 bonus for you)_ is the provider we recommend. It's the most capable one baibot supports, and the only one that pairs that full feature set with real privacy: inference runs on Venice's own GPUs or on zero-data-retention partner hardware, so your prompts and replies are stored nowhere and never used for training. It serves both frontier proprietary models and the latest open-source ones. + +Venice also leaves the content policy to you instead of imposing its own. Its models answer without the reflexive refusals some hosted services apply, and both text and image generation can handle adult or otherwise sensitive subjects when you need them to. Image generation ships a `safe_mode` that blurs adult content by default; you can turn it off (see the sample config). This pairs naturally with the privacy above: a bot you can speak to candidly, that keeps nothing. + +Unlike the [OpenAI Compatible](#openai-compatible) provider (which can also point at Venice, but drops images and can't reach its audio or native image endpoints), this is a first-class integration that exposes Venice's full parameter set: text-generation with vision, file inputs, prompt caching and native web search, plus speech-to-text, text-to-speech, and image generation and editing. + +You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [Venice provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#venice) with the help of the playbook's preset variables. + +Here's an example **addition** to your `vars.yml` file: + +```yaml +matrix_bot_baibot_config_agents_static_definitions_venice_enabled: true + +matrix_bot_baibot_config_agents_static_definitions_venice_config_api_key: "YOUR_API_KEY_HERE" + +# The preset ships sensible defaults for every purpose, so changing only the API key above is enough +# to get going. Uncomment and adjust any of these if you'd like to use different models: +# matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_model_id: kimi-k2-5 +# matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_model_id: chroma +``` + +Because this is a [statically](https://github.com/etkecc/baibot/blob/main/docs/configuration/README.md#static-configuration)-defined agent, it will be given a `static/` ID prefix and will be named `static/venice`. + +Every Venice knob (sampling, caching, reasoning, web-search behavior, voice and image controls) has a matching `matrix_bot_baibot_config_agents_static_definitions_venice_config_*` variable. The [fully-commented sample config](https://github.com/etkecc/baibot/blob/main/docs/sample-provider-configs/venice.yml) explains every one of them. + +If you'd like to use more than one model, take a look at the [Configuring additional agents (without a preset)](#configuring-additional-agents-without-a-preset) section below. + +💡 You may also wish to use this new agent for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers). #### Anthropic @@ -374,7 +405,7 @@ Example **additional** `vars.yml` configuration: # As such, changing any of these values subsequently has no effect on the bot's behavior. # Once initially configured, the global configuration is managed via bot commands, not via Ansible. -matrix_bot_baibot_config_initial_global_config_handler_catch_all: static/openai +matrix_bot_baibot_config_initial_global_config_handler_catch_all: static/venice # In this example, there's no need to define any of these below. # Configuring the catch-all purpose handler is enough. diff --git a/docs/configuring-playbook.md b/docs/configuring-playbook.md index 06079dc42..4fd798a86 100644 --- a/docs/configuring-playbook.md +++ b/docs/configuring-playbook.md @@ -190,7 +190,7 @@ Bridges can be used to connect your Matrix installation with third-party communi Bots provide various additional functionality to your installation. -- [Setting up baibot](configuring-playbook-bot-baibot.md) — a bot through which you can talk to various [AI](https://en.wikipedia.org/wiki/Artificial_intelligence) / [Large Language Models](https://en.wikipedia.org/wiki/Large_language_model) services ([OpenAI](https://openai.com/)'s [ChatGPT](https://openai.com/blog/chatgpt/) and [others](https://github.com/etkecc/baibot/blob/main/docs/providers.md)) +- [Setting up baibot](configuring-playbook-bot-baibot.md) — a bot through which you can talk to various [AI](https://en.wikipedia.org/wiki/Artificial_intelligence) / [Large Language Models](https://en.wikipedia.org/wiki/Large_language_model) services (the privacy-first [Venice](configuring-playbook-bot-baibot.md#venice) we recommend, [OpenAI](https://openai.com/)'s [ChatGPT](https://openai.com/blog/chatgpt/), and [others](https://github.com/etkecc/baibot/blob/main/docs/providers.md)) - [Setting up matrix-reminder-bot](configuring-playbook-bot-matrix-reminder-bot.md) — a bot to remind you about stuff diff --git a/roles/custom/matrix-bot-baibot/defaults/main.yml b/roles/custom/matrix-bot-baibot/defaults/main.yml index d1d02925c..d019bc1be 100644 --- a/roles/custom/matrix-bot-baibot/defaults/main.yml +++ b/roles/custom/matrix-bot-baibot/defaults/main.yml @@ -200,6 +200,12 @@ matrix_bot_baibot_config_agents_static_definitions_auto: |- 'provider': matrix_bot_baibot_config_agents_static_definitions_openai_provider, 'config': matrix_bot_baibot_config_agents_static_definitions_openai_config, }] if matrix_bot_baibot_config_agents_static_definitions_openai_enabled else []) + + + ([{ + 'id': matrix_bot_baibot_config_agents_static_definitions_venice_id, + 'provider': matrix_bot_baibot_config_agents_static_definitions_venice_provider, + 'config': matrix_bot_baibot_config_agents_static_definitions_venice_config, + }] if matrix_bot_baibot_config_agents_static_definitions_venice_enabled else []) }} matrix_bot_baibot_config_agents_static_definitions_custom: [] @@ -442,6 +448,175 @@ matrix_bot_baibot_config_agents_static_definitions_openai_config_image_generatio ######################################################################################## +######################################################################################## +# # +# Venice agent configuration # +# # +######################################################################################## + +matrix_bot_baibot_config_agents_static_definitions_venice_enabled: false +matrix_bot_baibot_config_agents_static_definitions_venice_id: venice +matrix_bot_baibot_config_agents_static_definitions_venice_provider: venice + +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) }}" + +matrix_bot_baibot_config_agents_static_definitions_venice_config_yaml: "{{ lookup('template', 'templates/provider/venice-config.yml.j2') }}" + +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 {} }}" + +matrix_bot_baibot_config_agents_static_definitions_venice_config_extension_yaml: | + # Your custom YAML configuration for this provider's configuration goes here. + # This configuration extends the default starting configuration (`matrix_bot_baibot_config_agents_static_definitions_venice_config`). + # + # You can override individual variables from the default configuration, or introduce new ones. + # + # If you need something more special, you can take full control by + # completely redefining `matrix_bot_baibot_config_agents_static_definitions_venice_config_yaml`. + # + # The fully-commented sample config (every Venice knob, with explanations) lives at: + # https://github.com/etkecc/baibot/blob/main/docs/sample-provider-configs/venice.yml + # + # Example configuration extension follows: + # + # text_generation: + # venice_parameters: + # enable_web_search: "off" + +matrix_bot_baibot_config_agents_static_definitions_venice_config_base_url: https://api.venice.ai/api/v1 + +matrix_bot_baibot_config_agents_static_definitions_venice_config_api_key: "" + +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_enabled: true +# For valid model choices, see: https://docs.venice.ai/models/overview +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_model_id: kimi-k2-5 +# The prompt text to use (can be null or empty to not use a prompt). +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}" +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_temperature: 1.0 +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_max_response_tokens: 4096 +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_max_context_tokens: 128000 +# How long Venice keeps the prompt prefix cached: "default", "extended", or "24h". +# "24h" makes a long, stable system prompt cheap across a day of conversations. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_prompt_cache_retention: 24h +# The optional top-level sampling and reasoning knobs below default to null, meaning the knob is +# omitted from the request and Venice applies its own server-side default. Set a value to override. +# Nucleus sampling, 0.0-1.0 (an alternative to temperature). +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_top_p: ~ +# Penalize tokens by how often they have already appeared, -2.0-2.0. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_frequency_penalty: ~ +# Penalize tokens that have appeared at all, -2.0-2.0. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_presence_penalty: ~ +# Penalize repetition; values above 1.0 discourage repeats. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_repetition_penalty: ~ +# Reasoning budget for models that support it: "low", "medium", or "high". +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_reasoning_effort: ~ +# Append the model's reasoning below the answer as a collapsible "Reasoning" block (folded by default). +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_show_reasoning: ~ + +# Venice-specific request parameters (the `venice_parameters` bag). Each non-null knob below is sent; +# a null knob is omitted, so Venice applies its own default. Omitting a knob is NOT the same as +# setting it to `false` (which actively sends `false`). +# Web search: "auto" (model decides), "on" (always), or "off". +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_search: auto +# Strip blocks from reasoning models so the user sees only the answer. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_strip_thinking_response: true +# Run in TEE-only mode (works across all models) instead of end-to-end-encrypted inference (only +# some models support it). TEE is still zero-retention private; this default keeps every model usable. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_e2ee: false +# Render web-search sources as readable citations in the reply. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_citations: ~ +# Let web search read full page content, not just snippets. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_scraping: ~ +# Prepend Venice's own system prompt alongside yours. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_include_venice_system_prompt: ~ +# Include search results inline in the streamed response. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_include_search_results_in_stream: ~ +# Return search results as documents rather than inline text. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_return_search_results_as_documents: ~ +# Allow web search to query X (Twitter). +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_x_search: ~ +# Disable the model's thinking phase entirely. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_disable_thinking: ~ +# Response verbosity for models that support it: "low", "medium", or "high". +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_verbosity: ~ +# Use a public Venice character by its slug. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_character_slug: ~ + +matrix_bot_baibot_config_agents_static_definitions_venice_config_speech_to_text_enabled: true +matrix_bot_baibot_config_agents_static_definitions_venice_config_speech_to_text_model_id: nvidia/parakeet-tdt-0.6b-v3 + +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_enabled: true +# Other models include tts-qwen3-1-7b, tts-xai-v1, tts-elevenlabs-turbo-v2-5, tts-minimax-speech-02-hd. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_model_id: tts-kokoro +# Voices are model-specific. Kokoro uses af_*/am_*/bf_*/bm_* (e.g. af_sky, am_adam). You can also pass +# a cloned-voice handle (vv_). An incompatible voice returns an error. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_voice: af_sky +# Output audio format: mp3, opus, aac, flac, wav, or pcm. mp3 is the broadest Matrix-client fit. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_response_format: mp3 +# The optional knobs below default to null (omitted). Set a value to override Venice's default. +# Playback speed, 0.25-4.0 (1.0 is normal). +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_speed: ~ +# A style prompt steering emotion/delivery (e.g. "Excited and energetic."). Only Qwen 3 TTS uses it. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_prompt: ~ +# Sampling temperature, 0.0-2.0. Only Qwen 3 / Orpheus / Chatterbox HD use it. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_temperature: ~ +# Nucleus sampling, 0.0-1.0. Only Qwen 3 TTS uses it. +matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_top_p: ~ + +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_enabled: true +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_model_id: chroma +# The optional generation knobs below default to null (omitted). Set a value to override Venice's +# default. Omitting a knob is NOT the same as setting it: an omitted knob lets Venice apply its own +# default, a set value is sent verbatim. +# A description of what should NOT appear in the image. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_negative_prompt: ~ +# CFG scale, 0-20. Higher values make the image adhere more closely to the prompt. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_cfg_scale: ~ +# Number of inference steps. Model-specific; some models ignore it. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_steps: ~ +# A named style to apply (e.g. "3D Model"). See Venice's image-styles reference. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_style_preset: ~ +# Random seed, -999999999-999999999. Fix it for reproducible results; omit for a random seed. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_seed: ~ +# Blur images classified as adult content. Defaults to true. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_safe_mode: ~ +# Hide the Venice watermark. Venice may ignore this for certain generated content. Defaults to false. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_hide_watermark: ~ +# Output format: jpeg, png, or webp. webp is smallest; png is highest-quality. Defaults to webp. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_format: ~ +# Image dimensions in pixels, each 1-1280. Default 1024x1024. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_width: ~ +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_height: ~ +# Aspect ratio (used by certain models, e.g. Nano Banana): "1:1", "16:9". An alternative to width/height. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_aspect_ratio: ~ +# Resolution tier (used by certain models): "1K", "2K", "4K". +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_resolution: ~ +# Output quality for supported models (e.g. GPT Image 2): low, medium, high. Higher can cost more. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_quality: ~ +# Lora strength, 0-100. Only applies if the model uses additional Loras. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_lora_strength: ~ +# Embed the generation prompt into the image's EXIF metadata. Defaults to false. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_embed_exif_metadata: ~ +# Let the model pull the latest info from the web for the image. Model-specific; costs extra credits. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_enable_web_search: ~ +# Image editing shares this image_generation config block; only the model differs. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_model_id: firered-image-edit +# The optional edit knobs below default to null (omitted). Set a value to override Venice's default. +# Output format: jpeg, png, or webp. When omitted, Venice infers it (PNG at 1K, JPEG at 2K/4K). +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_output_format: ~ +# Aspect ratio of the result: auto, 1:1, 3:2, 16:9, 21:9, 9:16, 2:3, 3:4, 4:5 (model-specific). +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_aspect_ratio: ~ +# Resolution tier: 1K, 2K, 4K (model-specific). Defaults to 1K. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_resolution: ~ +# Blur images classified as adult content. Defaults to true. +matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_safe_mode: ~ + +######################################################################################## +# # +# /Venice agent configuration # +# # +######################################################################################## + + # Controls the `initial_global_config.handler.catch_all` configuration setting. # # This is an initial global configuration setting. diff --git a/roles/custom/matrix-bot-baibot/tasks/validate_config.yml b/roles/custom/matrix-bot-baibot/tasks/validate_config.yml index 2352e9eb6..cf6636403 100644 --- a/roles/custom/matrix-bot-baibot/tasks/validate_config.yml +++ b/roles/custom/matrix-bot-baibot/tasks/validate_config.yml @@ -25,6 +25,8 @@ - {'name': 'matrix_bot_baibot_config_agents_static_definitions_openai_config_api_key', when: "{{ matrix_bot_baibot_config_agents_static_definitions_openai_enabled }}"} + - {'name': 'matrix_bot_baibot_config_agents_static_definitions_venice_config_api_key', when: "{{ matrix_bot_baibot_config_agents_static_definitions_venice_enabled }}"} + - name: Fail if baibot authentication mode is not configured ansible.builtin.fail: msg: >- diff --git a/roles/custom/matrix-bot-baibot/templates/provider/venice-config.yml.j2 b/roles/custom/matrix-bot-baibot/templates/provider/venice-config.yml.j2 new file mode 100644 index 000000000..5cfd8352f --- /dev/null +++ b/roles/custom/matrix-bot-baibot/templates/provider/venice-config.yml.j2 @@ -0,0 +1,154 @@ +#jinja2: lstrip_blocks: True +base_url: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_base_url | to_json }} + +api_key: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_api_key | to_json }} + +{% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_enabled %} +text_generation: + model_id: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_model_id | to_json }} + prompt: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_prompt | to_json }} + temperature: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_temperature | to_json }} + max_response_tokens: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_max_response_tokens | int | to_json }} + max_context_tokens: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_max_context_tokens | int | to_json }} + prompt_cache_retention: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_prompt_cache_retention | to_json }} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_top_p is not none %} + top_p: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_top_p | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_frequency_penalty is not none %} + frequency_penalty: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_frequency_penalty | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_presence_penalty is not none %} + presence_penalty: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_presence_penalty | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_repetition_penalty is not none %} + repetition_penalty: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_repetition_penalty | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_reasoning_effort is not none %} + reasoning_effort: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_reasoning_effort | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_show_reasoning is not none %} + show_reasoning: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_show_reasoning | to_json }} + {% endif %} + venice_parameters: + enable_web_search: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_search | to_json }} + strip_thinking_response: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_strip_thinking_response | to_json }} + enable_e2ee: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_e2ee | to_json }} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_citations is not none %} + enable_web_citations: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_citations | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_scraping is not none %} + enable_web_scraping: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_web_scraping | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_include_venice_system_prompt is not none %} + include_venice_system_prompt: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_include_venice_system_prompt | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_include_search_results_in_stream is not none %} + include_search_results_in_stream: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_include_search_results_in_stream | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_return_search_results_as_documents is not none %} + return_search_results_as_documents: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_return_search_results_as_documents | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_x_search is not none %} + enable_x_search: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_enable_x_search | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_disable_thinking is not none %} + disable_thinking: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_disable_thinking | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_verbosity is not none %} + verbosity: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_verbosity | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_character_slug is not none %} + character_slug: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_generation_venice_parameters_character_slug | to_json }} + {% endif %} +{% endif %} + +{% if matrix_bot_baibot_config_agents_static_definitions_venice_config_speech_to_text_enabled %} +speech_to_text: + model_id: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_speech_to_text_model_id | to_json }} +{% endif %} + +{% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_enabled %} +text_to_speech: + model_id: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_model_id | to_json }} + voice: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_voice | to_json }} + response_format: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_response_format | to_json }} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_speed is not none %} + speed: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_speed | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_prompt is not none %} + prompt: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_prompt | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_temperature is not none %} + temperature: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_temperature | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_top_p is not none %} + top_p: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_text_to_speech_top_p | to_json }} + {% endif %} +{% endif %} + +{% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_enabled %} +image_generation: + model_id: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_model_id | to_json }} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_negative_prompt is not none %} + negative_prompt: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_negative_prompt | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_cfg_scale is not none %} + cfg_scale: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_cfg_scale | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_steps is not none %} + steps: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_steps | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_style_preset is not none %} + style_preset: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_style_preset | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_seed is not none %} + seed: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_seed | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_safe_mode is not none %} + safe_mode: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_safe_mode | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_hide_watermark is not none %} + hide_watermark: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_hide_watermark | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_format is not none %} + format: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_format | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_width is not none %} + width: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_width | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_height is not none %} + height: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_height | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_aspect_ratio is not none %} + aspect_ratio: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_aspect_ratio | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_resolution is not none %} + resolution: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_resolution | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_quality is not none %} + quality: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_quality | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_lora_strength is not none %} + lora_strength: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_lora_strength | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_embed_exif_metadata is not none %} + embed_exif_metadata: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_embed_exif_metadata | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_enable_web_search is not none %} + enable_web_search: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_enable_web_search | to_json }} + {% endif %} + edit: + model_id: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_model_id | to_json }} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_output_format is not none %} + output_format: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_output_format | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_aspect_ratio is not none %} + aspect_ratio: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_aspect_ratio | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_resolution is not none %} + resolution: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_resolution | to_json }} + {% endif %} + {% if matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_safe_mode is not none %} + safe_mode: {{ matrix_bot_baibot_config_agents_static_definitions_venice_config_image_generation_edit_safe_mode | to_json }} + {% endif %} +{% endif %} diff --git a/roles/custom/matrix-bot-baibot/templates/provider/venice-config.yml.j2.license b/roles/custom/matrix-bot-baibot/templates/provider/venice-config.yml.j2.license new file mode 100644 index 000000000..ed4a74493 --- /dev/null +++ b/roles/custom/matrix-bot-baibot/templates/provider/venice-config.yml.j2.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2026 Nikita Chernyi + +SPDX-License-Identifier: AGPL-3.0-or-later