garak.generators.mistral

Support Mistral hosted endpoints

class MistralGenerator(name='', config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/stable/garak/_config.py'>)Source

Bases: Generator

Interface for public endpoints of models hosted in Mistral La Plateforme (console.mistral.ai). Expects API key in MISTRAL_API_TOKEN environment variable.

Configurable parameters:

DEFAULT_PARAMS contents:

  • max_tokens = 150

  • temperature = None

  • top_k = None

  • context_len = None

  • skip_seq_start = None

  • skip_seq_end = None

  • name = 'mistral-large-latest'

Default values are listed

See also Configuring garak for how to set these values.

Other attributes:

ENV_VAR = 'MISTRAL_API_KEY'
extra_dependency_names = ['mistralai']
fullname = 'Mistral AI'
generator_family_name = 'mistral'
supports_multiple_generations = False