Skip to content
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

[FEAT] Normalizer multi modal/flexible support refactor #143

Merged

Conversation

rlundeen2
Copy link
Contributor

@rlundeen2 rlundeen2 commented Apr 15, 2024

Description

The Architecture of pyrit began by having a string "prompt" that ran through. Converters took a string, targets took a string, and orchestrators sent a string.

This proved too limited since certain converters and targets can take multiple input types (sometimes simultaneously), and they are handled differently.

This refactor adds PromptRequestResponse objects that adds more flexibility in how we send and process prompts.

Tests and Documentation

  • Several tests added, but more needs to be done
  • Jupytext runs pass

Copy link
Contributor

@cseifert1 cseifert1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some initial comments. this was a massive refactor. great job! Thank you for tackling this, Rich!

pyrit/prompt_normalizer/prompt_normalizer.py Show resolved Hide resolved
pyrit/models/prompt_request_response.py Show resolved Hide resolved
pyrit/models/prompt_request_piece.py Show resolved Hide resolved
pyrit/prompt_normalizer/normalizer_request.py Show resolved Hide resolved
pyrit/prompt_normalizer/prompt_normalizer.py Outdated Show resolved Hide resolved
pyrit/models/prompt_request_piece.py Show resolved Hide resolved
pyrit/models/prompt_request_piece.py Show resolved Hide resolved
pyrit/models/prompt_request_response.py Show resolved Hide resolved
pyrit/memory/memory_interface.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jbolor21 jbolor21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some small comments, but great job with this!!!

tests/test_prompt_normalizer.py Outdated Show resolved Hide resolved
pyrit/prompt_normalizer/normalizer_request.py Show resolved Hide resolved
pyrit/orchestrator/orchestrator_class.py Outdated Show resolved Hide resolved
pyrit/score/text.py Outdated Show resolved Hide resolved
pyrit/prompt_target/text_target.py Show resolved Hide resolved
pyrit/prompt_target/prompt_target.py Show resolved Hide resolved
pyrit/models/prompt_request_piece.py Show resolved Hide resolved
pyrit/models/prompt_request_piece.py Show resolved Hide resolved
pyrit/models/__init__.py Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
pyrit/prompt_target/dall_e_target.py Outdated Show resolved Hide resolved
@rlundeen2 rlundeen2 changed the title [DRAFT] Normalizer multi modal/flexible support refactor [FEAT] Normalizer multi modal/flexible support refactor Apr 16, 2024
@rlundeen2 rlundeen2 marked this pull request as ready for review April 16, 2024 15:58
@rlundeen2 rlundeen2 merged commit dea1d75 into Azure:main Apr 16, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants