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: add support for chat messages dataset #90

Merged
merged 7 commits into from
Mar 11, 2024
Merged

Conversation

dlmgary
Copy link
Contributor

@dlmgary dlmgary commented Mar 7, 2024

Description

This PR adds:

  • Support for chat messages dataset.
  • Jupyter notebook explaining how to use the ChatMessagesDataset object.
  • Fixes deprecated pydantic functions (i.e., json, parse_raw)
  • Sample ChatMessagesDataset file.
  • Updates ChatMessage model to support other parameters available in the OpenAI Completions API.

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

pyrit/models.py Show resolved Hide resolved
pyrit/models.py Show resolved Hide resolved
pyrit/models.py Outdated Show resolved Hide resolved
doc/code/datasets.ipynb Outdated Show resolved Hide resolved
pyrit/models.py Outdated Show resolved Hide resolved
doc/code/datasets.ipynb Outdated Show resolved Hide resolved
Copy link
Contributor

@rlundeen2 rlundeen2 left a comment

Choose a reason for hiding this comment

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

Blocking on the re-design. It's great work but let's sync! The big ideas here

  • Shift to memoryInterface for anything an operator/pyrit wants to keep track of
  • chat_message_normalizer should be the "truth", but we should be able to convert to/from that other formats from there

@dlmgary dlmgary requested a review from rlundeen2 March 8, 2024 21:22
Copy link
Contributor

@rlundeen2 rlundeen2 left a comment

Choose a reason for hiding this comment

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

I may want us to update the documentation later; not because it's unclear, but because datasets workflows are different from most of pyrit. E.g. we generally don't want folks to store multi-turn conversations using this.

@dlmgary dlmgary merged commit 5d3de2c into Azure:main Mar 11, 2024
4 checks passed
@dlmgary dlmgary deleted the dlmgary branch March 11, 2024 16:10
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