datarobot_genai.dragent.frontends.converters
converters
convert_run_agent_input_to_chat_request_or_message
Bridge plain RunAgentInput to NAT chat completions for inner workflow agents.
DRAgent registers converters for DRAgentRunAgentInput only. The DRUM
NatAgent.invoke path produces plain RunAgentInput at the
streaming_memory_agent passthrough boundary, where inner
per_user_tool_calling_agent expects ChatRequestOrMessage.
Source code in datarobot_genai/dragent/frontends/converters.py
convert_str_to_chat_response
Convert a workflow's string output to a ChatResponse reporting the configured model.
Overrides NAT's built-in str -> ChatResponse converter, which calls
ChatResponse.from_string(data, usage=usage) without a model and so
falls back to its "unknown-model" default:
https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/99e07260fe71872202cdcff1c899f15ef14f4852/packages/nvidia_nat_core/src/nat/data_models/api_server.py#L973
dragent ignores the request's model (the agent runs its configured LLM), so the
response reports that configured model (:func:default_response_model), independent
of what the caller sent.
Source code in datarobot_genai/dragent/frontends/converters.py
convert_nat_chat_response_chunk_to_openai_chat_completion_chunk
convert_nat_chat_response_chunk_to_openai_chat_completion_chunk(chunk: ChatResponseChunk) -> ChatCompletionChunk
Map NAT streaming chunk to OpenAI chat.completion.chunk.
Source code in datarobot_genai/dragent/frontends/converters.py
convert_dragent_event_response_to_openai_chat_completion_chunk
convert_dragent_event_response_to_openai_chat_completion_chunk(response: DRAgentEventResponse) -> ChatCompletionChunk
Convert one DRAgent stream chunk to an OpenAI chunk (dome / moderation streaming).