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

Support conversation_style of openai format (OpenAI API style) #890

Merged
merged 13 commits into from
Apr 28, 2024
Prev Previous commit
Next Next commit
Update torchtune/data/_converters.py
Co-authored-by: Rafi Ayub <33648637+RdoubleA@users.noreply.github.com>
xingyaoww and RdoubleA authored Apr 28, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 66a5831c8bbbe58b031ec5b7c31b904d1d5cb204
2 changes: 1 addition & 1 deletion torchtune/data/_converters.py
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ def openai_to_llama2_messages(
"""
Convert a chat sample adhering to the OpenAI API standard chat format to the Llama2 chat format.
xingyaoww marked this conversation as resolved.
Show resolved Hide resolved

OpenAI API standard chat format follows::
OpenAI API `standard chat format <https://platform.openai.com/docs/guides/text-generation/chat-completions-api>`_ follows::
Check https://platform.openai.com/docs/guides/text-generation/chat-completions-api for more details
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

{
# key could be "messages" OR "conversations"