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

Adding Chat Message Normalizers so AML can work with more Models #45

Merged
merged 10 commits into from
Feb 16, 2024

Conversation

rlundeen2
Copy link
Contributor

@rlundeen2 rlundeen2 commented Feb 15, 2024

Description

Some AML endpoints do not support system messages. This adds code so with AML targets, you can specify on initialization how to normalize chat messages. It also adds one specific way to squash system messages, which is one of the most common

  • Making roles in ChatMessage strict
  • Adds common ChatMessage normalizing code (since we'll need this same functionality elsewhere)
  • Fixes AML endpoints so they can work out of the box with RedTeamingBot and other ChatSupport interfaces

Tests

  • no new tests required
  • new tests added
  • existing tests adjusted

Documentation

  • no documentation changes needed
  • documentation added or edited
  • example notebook added or updated

Copy link

github-actions bot commented Feb 15, 2024

Test Results

114 tests  +9   114 ✅ +9   10s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit cd1c5a1. ± Comparison against base commit b4beb27.

♻️ This comment has been updated with latest results.

@rlundeen2 rlundeen2 changed the title fixing aml so system messages are squashed Adding Chat Message Normalizers so AML can work with more Models Feb 15, 2024
pyrit/chat_message_normalizer/generic_system_squash.py Outdated Show resolved Hide resolved
pyrit/memory/memory_models.py Outdated Show resolved Hide resolved
@rlundeen2 rlundeen2 merged commit 83cca11 into main Feb 16, 2024
7 checks passed
@rlundeen2 rlundeen2 deleted the users/rlundeen/2_14_aml_system_fix branch February 16, 2024 21:16
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

3 participants