nemo_gym.openai_utils
nemo_gym.openai_utils
Module Contents
Classes
Data
NeMoGymChatCompletionContentPartParam
NeMoGymChatCompletionMessageParam
API
Bases: BaseModel
This is just a stub class that wraps around aiohttp
Bases: ChatCompletion
Bases: typing.TypedDict
Bases: ChatCompletionAssistantMessageParam
Bases: ChatCompletionContentPartImageParam
Bases: ChatCompletionContentPartTextParam
Bases: BaseModel
Bases: ChatCompletionDeveloperMessageParam
Bases: ChatCompletionMessage
Bases: ChatCompletionMessageToolCall
Bases: typing.TypedDict
Bases: ChatCompletionMessageToolCallParam
Bases: ChatCompletionSystemMessageParam
Bases: ChatCompletionToolMessageParam
Bases: ChatCompletionToolParam
Bases: ChatCompletionUserMessageParam
Bases: Choice
Bases: BaseModel
Bases: BaseModel
Bases: BaseModel
We copy openai.types.responses.response_input_param.FunctionCallOutput, originally a TypedDict, as a BaseModel here so that we can use it in the NeMoGymResponseOutputItem below and be consistent with the other ResponseOutputItem types.
Bases: FunctionDefinition
Bases: FunctionToolParam
Bases: BaseModel
Bases: NeMoGymMessage, TokenIDLogProbMixin
Bases: Response
Bases: BaseModel
This class is a copy of openai.types.responses.response_create_params.ResponseCreateParamsNonStreaming We make a copy of it here since ResponseCreateParamsNonStreaming is a TypedDict with no strict validation. We need to do server side validation here.
Bases: BaseModel
Bases: ResponseInputTextParam
Bases: ResponseInputTokensDetails
Bases: McpApprovalRequest
A hosted-MCP approval request (OpenAI Responses mcp_approval_request item).
Inherits the upstream McpApprovalRequest typing; id/server_label
are relaxed to optional to tolerate endpoints that omit them.
Bases: McpCall
A hosted-MCP tool call (OpenAI Responses mcp_call output item).
Emitted when the upstream endpoint executes a tool server-side (e.g.
NVIDIA-hosted gpt-oss surfacing its built-in python tool as MCP) instead of
returning a client-executed function_call. The output/error
fields are already populated by the server, so the agent parses and passes
it through; there is no client-side execution and hence no training variant.
Inherits the upstream McpCall typing and only relaxes the fields
NVIDIA-hosted endpoints may omit or widen: id/server_label are made
optional and status accepts any string (upstream pins it to a Literal).
Bases: McpListTools
A hosted-MCP tool listing (OpenAI Responses mcp_list_tools output item).
Inherits the upstream McpListTools typing; only id/server_label
are relaxed to optional (NVIDIA-hosted endpoints may omit them) and tools
is widened to List[Any] so raw tool entries pass through without being
coerced into the upstream McpListToolsTool schema.
Bases: BaseModel
Bases: BaseModel
Bases: BaseModel
Bases: ResponseOutputTokensDetails
Bases: BaseModel
Bases: ResponseUsage
Bases: Summary
Bases: BaseModel
Bases: typing.TypedDict