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

Prompt Normalizer and Refactor #32

Merged
merged 33 commits into from
Feb 5, 2024

Conversation

rlundeen2
Copy link
Contributor

Description

This rearchitects the code to use prompt normalizer, prompt targets, prompt transformers, and orchestrators.

It also has some minor updates with memory, which is used to keep track of conversations in the normalizer.

Tests

  • no new tests required
  • [x ] new tests added
  • existing tests adjusted

Documentation

  • no documentation changes needed
  • [ x] documentation added or edited
  • [x ] example notebook added or updated

rlundeen2 and others added 16 commits January 31, 2024 15:49
* adding environment var for embewdding

* adding tests for defaults

* fixing issues with test

* fixing build issues

* removing configuration

* build system
* adding environment var for embewdding

* adding tests for defaults

* fixing issues with test

* fixing build issues

* removing configuration

* build system
* adding environment var for embewdding

* adding tests for defaults

* fixing issues with test

* fixing build issues

* removing configuration

* build system
Copy link

github-actions bot commented Jan 31, 2024

Test Results

83 tests  +11   83 ✅ +11   9s ⏱️ -1s
 1 suites ± 0    0 💤 ± 0 
 1 files   ± 0    0 ❌ ± 0 

Results for commit 9a46037. ± Comparison against base commit 4aace51.

This pull request removes 1 and adds 12 tests. Note that renamed tests count towards both.
tests.memory.test_file_memory ‑ test_file_memory_get_memory_by_session_id
tests.memory.test_file_memory ‑ test_file_memory_get_memory_by_conversation_id
tests.memory.test_file_memory ‑ test_file_memory_get_memory_by_normalizer_id
tests.test_prompt_orchestrator ‑ test_send_multiple_prompts_no_transformer
tests.test_prompt_orchestrator ‑ test_send_prompt_no_transformer
tests.test_prompt_orchestrator ‑ test_send_prompts_b64_transform
tests.test_prompt_orchestrator ‑ test_sendprompts_orchestrator_sets_target_memory
tests.test_prompt_target ‑ test_complete_chat_user_no_system
tests.test_prompt_target ‑ test_complete_chat_user_with_system
tests.test_prompt_target ‑ test_complete_chat_user_with_system_calls_chat_complete
tests.test_prompt_target ‑ test_set_system_prompt
…

♻️ This comment has been updated with latest results.

@romanlutz
Copy link
Contributor

Can you add a more descriptive PR title? 🙂

@rlundeen2 rlundeen2 changed the title Users/rlundeen/1 19 prompt normalizer 1 Prompt Normilzer and Refactor Jan 31, 2024
@romanlutz romanlutz changed the title Prompt Normilzer and Refactor Prompt Normalizer and Refactor Feb 1, 2024
examples/code/orchestrator.ipynb Show resolved Hide resolved
pyrit/agent/red_teaming_bot.py Outdated Show resolved Hide resolved
pyrit/memory/memory_interface.py Show resolved Hide resolved
pyrit/orchestrator/send_all_prompts_orchestrator.py Outdated Show resolved Hide resolved
pyrit/prompt_target/prompt_target.py Show resolved Hide resolved
pyrit/prompt_normalizer/prompt_normalizer.py Show resolved Hide resolved
@cseifert1
Copy link
Contributor

cseifert1 commented Feb 2, 2024 via email

datasets/prompts/gandalf.prompt Outdated Show resolved Hide resolved
datasets/prompts/gandalf.prompt Outdated Show resolved Hide resolved
datasets/prompts/illegal.prompt Show resolved Hide resolved
examples/code/orchestrator.ipynb Show resolved Hide resolved
pyrit/memory/memory_interface.py Outdated Show resolved Hide resolved
pyrit/orchestrator/prompt_sending_orchestrator.py Outdated Show resolved Hide resolved
pyrit/prompt_target/prompt_target.py Outdated Show resolved Hide resolved
pyrit/prompt_target/prompt_target.py Outdated Show resolved Hide resolved
tests/test_prompt_orchestrator.py Outdated Show resolved Hide resolved
@rlundeen2 rlundeen2 merged commit 871e7aa into main Feb 5, 2024
7 checks passed
@rlundeen2 rlundeen2 deleted the users/rlundeen/1_19_prompt_normalizer_1 branch February 5, 2024 21:28
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