Feature/add mistral generator#1135
Conversation
|
DCO Assistant Lite bot All contributors have signed the DCO ✍️ ✅ |
|
I have read the DCO Document and I hereby sign the DCO |
|
recheck |
jmartin-tech
left a comment
There was a problem hiding this comment.
Looks like a good first pass, API keys and default values are part for the Configurable plugin implementation. I have offered a refactor that would move this validation and default to enable our yaml and json based configuration to work with this generator.
It would be helpful to have a few example generation responses as mocks for pytests added to validate this new generator code.
Co-authored-by: Jeffrey Martin <jmartin@Op3n4M3.dev> Signed-off-by: Erwan ROUSSEL <e-roussel@outlook.com>
|
How to add the mistral api key for the pytests in github actions ? |
Tests can exist that require a key for usage in integration testing however, these test are not run in CI. Github actions will not use a live API key, tests should exists that |
|
Here we go, we have a |
|
Thanks for the example, it was a hard path to find how to create the mock file but I found this on my way https://github.com/mistralai/client-python/blob/main/docs/models/chatcompletionresponse.md. Should be done with the last commit |
jmartin-tech
left a comment
There was a problem hiding this comment.
@dimensi0n this is great progress, I noted a question about why the code is pushing a value into the environment that is explicitly passed to the client object and have requested some more work in the backoff handling.
Signed-off-by: Erwan ROUSSEL <e-roussel@outlook.com>
|
Up |
Mistral is an advanced language model that offers powerful and precise text generation capabilities. It has been specifically designed to follow precise instructions, reason, handle multi-turn conversations, and generate code. By integrating Mistral into Garak, we enable users to test this state-of-the-art model against various attacks and vulnerabilities, ensuring safer and more reliable use in real-world applications.
Verification
$ export MISTRAL_API_KEY=abcdefg123456789 $ python3 -m garak --model_type mistral --model_name mistral-small-latest --probes test.BlankThe default model name is [mistral-large-latest] (https://mistral.ai/fr/news/mistral-large-2407)