assistant.config ================ .. py:module:: assistant.config Attributes ---------- .. autoapisummary:: assistant.config.ASSISTANT_LOGGER assistant.config.CONFIG Classes ------- .. autoapisummary:: assistant.config.AssistantConfig Module Contents --------------- .. py:data:: ASSISTANT_LOGGER :type: logging.Logger .. py:class:: AssistantConfig Bases: :py:obj:`viur.core.config.ConfigType` Configuration for viur-assistant plugin. .. py:attribute:: api_openai_key :type: str :value: None API Key for OpenAi .. py:attribute:: api_anthropic_key :type: str :value: None API Key for Anthropic .. py:attribute:: language_map :type: Dict[str, str] Maps language codes to human-readable language names or specific language variants. This dictionary allows mapping short language identifiers (e.g., BCP 47 language tags) to more descriptive names. It supports both standard language codes (like "de" for German) and extended tags (like "de-DE-x-simple-language" for simplified German). Useful for precise language definitions and for differentiating between standard and stylistic variants of a language. .. py:attribute:: translate_language_characteristics :type: dict[str, Iterable[str]] Dictionary for defining style characteristics of translations. Each key represents a named translation style (e.g., "simple"), and its value is a list of stylistic rules or constraints that should be followed when generating a translation in that style. The special key "*" defines rules that are *always* applied in addition to any specific style. These are base-level constraints that apply globally, regardless of the selected style. Example: - The "simple" characteristic focuses on clarity and accessibility, encouraging short, active-voice sentences with simple vocabulary and structure. - The "*" characteristic enforces universally that the output must not be vulgar. This structure allows combining a base set of rules with additional style-specific ones. .. py:attribute:: describe_image_jpeg_quality_default :value: 50 Default JPEG compression quality used when resizing and encoding images. A value of 50 strikes a balance between file size and visual clarity, ensuring efficient transmission and sufficient detail for AI-based image analysis. Valid range is 0 (lowest quality) to 100 (best quality). .. py:attribute:: describe_image_pixel_default :value: 100000 Default target pixel count (width × height) used when resizing an image for AI-based description. Balances sufficient detail with low token cost. Used by `_get_resized_image_bytes` if no other value is provided. .. py:data:: CONFIG :type: Final[AssistantConfig] The viur-assistent config instance.