assistant.config¶
Attributes¶
The viur-assistent config instance. |
Classes¶
Configuration for viur-assistant plugin. |
Module Contents¶
- assistant.config.ASSISTANT_LOGGER: logging.Logger¶
- class assistant.config.AssistantConfig¶
Bases:
viur.core.config.ConfigTypeConfiguration for viur-assistant plugin.
- api_openai_key: str = None¶
API Key for OpenAi
- api_anthropic_key: str = None¶
API Key for Anthropic
- language_map: 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.
- translate_language_characteristics: 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.
- describe_image_jpeg_quality_default = 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).
- describe_image_pixel_default = 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.
- assistant.config.CONFIG: Final[AssistantConfig]¶
The viur-assistent config instance.