fix: preserve text task context in OpenAI chat adapter#1320
Closed
Genmin wants to merge 1 commit into
Closed
Conversation
kcz358
reviewed
May 6, 2026
Collaborator
kcz358
left a comment
There was a problem hiding this comment.
Hi, I think this would hurt most of the tasks that use doc to messages to construct the messages. If there are tasks with wrong auto wrapped doc to messages function, the tasks should be revise instead of changing the doc to messages logic in the oai model.
Contributor
Author
|
Thanks for taking a look. I agree with the concern: this is too broad for the model adapter layer, and task-specific message construction should be fixed at the task level instead. Closing this to avoid pushing behavior that could regress normal doc_to_messages tasks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ctxfor text-only OpenAI chat requests instead of sending only the rawdoc_to_messagesquestion textdoc_to_messagespathFixes #1319.
Validation
uv run --with pytest --with loguru --with python-dotenv --with openai --with pydantic --with tqdm --with numpy --with pillow --with accelerate python -m pytest test/models/test_openai_chat.py -quv run --with loguru --with python-dotenv --with openai --with pydantic --with tqdm --with numpy --with pillow --with accelerate python -m py_compile lmms_eval/models/chat/openai.py test/models/test_openai_chat.pygit diff --check