Azure / PyRIT

The Python Risk Identification Tool for generative AI (PyRIT) is an open access automation framework to empower security professionals and machine learning engineers to proactively find risks in their generative AI systems.
MIT License
1.91k stars 368 forks source link

openrouter.ai as PromptChatTarget #552

Closed gerimisc closed 1 week ago

gerimisc commented 1 week ago

Hello Team,

I've used the orchestrators (mostly on prompt_sending_orchestrator.py in my own use cases) successfully but was missing out on Open Router implementation as adversary/scorer agent. I think the ease of use particularly on the model routing (as of writing, there are 270 models available) would be a great addition to both using it as part of red_teaming_orchestrator.py (multi_turn) or as standalone Scorer.

Is your feature request related to a problem? Please describe.

Understandably, the targets are on Azure OpenAI.

Consider Open Router as an alternative would offer flexibility and more autonomy for prompt injection testing. Its API is also relatively straightforward to implement and offer great model variation https://openrouter.ai/docs/models

Describe the solution you'd like

New prompt_target for Open Router

Describe alternatives you've considered, if relevant

I am considering to implement another implementation for OpenRouter that inherits PromptChatTarget and potentially submitting a Pull request. This should mean an addition of:

Just wondering if this has been considered! Thanks for open sourcing this !

gerimisc commented 1 week ago

dup with 551, kindly remove