nemo_gym.responses_converter
nemo_gym.responses_converter
Shared Responses API ↔ Chat Completions converter.
This module contains the translation logic between OpenAI’s Responses API format and the Chat Completions API format. It is used by model servers that need to convert between the two formats (e.g. vllm_model, inference_provider).
Module Contents
Classes
Functions
Data
VLLMConverterResponsesToChatCompletionsState
API
Bases: BaseModel
Converts between OpenAI Responses API and Chat Completions API formats.
Collects text from ‘reasoning’ messages in responses api and appends it to a buffer.
This is done to group together one (or multiple) reasoning message(s) into a single, cohesive block, later prepending it to a subsequent assistant message. See: https://github.com/NVIDIA-NeMo/Gym/blob/main/docs/how-to-faq.md#faq-openai-responses-vs-chat-completions-api for an example of reasoning in responses api.
Bases: BaseModel