garak.generators.groq
GroqChat API support
- class garak.generators.groq.GroqChat(name='', config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)
Bases:
OpenAICompatible
Wrapper for Groq-hosted LLM models.
Expects GROQ_API_KEY environment variable. See https://console.groq.com/docs/quickstart for more info on how to set up a Groq API key Uses the [OpenAI-compatible API](https://console.groq.com/docs/openai)
- DEFAULT_PARAMS = {'context_len': None, 'frequency_penalty': 0.0, 'max_tokens': 150, 'presence_penalty': 0.0, 'retry_json': True, 'seed': None, 'stop': ['#', ';'], 'suppressed_params': {'frequency_penalty', 'logit_bias', 'logprobs', 'n', 'presence_penalty', 'top_logprobs'}, 'temperature': 0.7, 'top_k': None, 'top_p': 1.0, 'uri': 'https://api.groq.com/openai/v1', 'vary_seed_each_call': True, 'vary_temp_each_call': True}
- ENV_VAR = 'GROQ_API_KEY'
- active = True
- generator_family_name = 'Groq'
- supports_multiple_generations = False