-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add mistral generator #1135
base: main
Are you sure you want to change the base?
Conversation
DCO Assistant Lite bot All contributors have signed the DCO ✍️ ✅ |
I have read the DCO Document and I hereby sign the DCO |
recheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]> Signed-off-by: Erwan ROUSSEL <[email protected]>
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 <[email protected]>
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.Blank
The default model name is [mistral-large-latest] (https://mistral.ai/fr/news/mistral-large-2407)