Skip to content

Conversation

@willkill07
Copy link
Member

@willkill07 willkill07 commented Oct 6, 2025

Description

Ensure that ReAct and Tool Calling examples use the OpenAI specification for input.

Closes nvbugs-5560815

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Summary by CodeRabbit

  • Documentation
    • Updated example HTTP request payloads to use a messages array with role/content for both non-streaming and streaming scenarios in agent and tool-calling guides.
    • Aligned request formats across examples for consistency and easier adoption.
    • Clarified how to construct user messages in requests; no changes to logic or control flow.

@willkill07 willkill07 requested a review from a team as a code owner October 6, 2025 17:51
@willkill07 willkill07 added doc Improvements or additions to documentation non-breaking Non-breaking change labels Oct 6, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 6, 2025

Walkthrough

Updated example README docs to replace HTTP payload examples from {"input_message": "..."} to a structured {"messages": [{"role": "user", "content": "..."}]} format in both non-streaming and streaming sections for React and tool-calling agents. No code, logic, or API declarations were changed.

Changes

Cohort / File(s) Summary of Changes
Examples agents README updates
examples/agents/react/README.md, examples/agents/tool_calling/README.md
Replaced request payload examples from {"input_message": "..."} to {"messages": [{"role": "user", "content": "..."}]} in both Non-Streaming and Streaming sections; no other modifications or control-flow changes; no public/exported entity changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly conveys the main change by instructing to adopt the OpenAI schema for both ReAct and Tool Calling agents, uses the imperative mood with “Prefer,” complies with conventional commit style via the “fix:” prefix, and remains well under the 72-character limit. It directly reflects the content of the pull request without introducing unrelated terms or ambiguity.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf971e1 and 31e3684.

📒 Files selected for processing (2)
  • examples/agents/react/README.md (2 hunks)
  • examples/agents/tool_calling/README.md (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • examples/agents/tool_calling/README.md
🧰 Additional context used
📓 Path-based instructions (3)
**/README.@(md|ipynb)

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Ensure READMEs follow the naming convention; avoid deprecated names; use “NeMo Agent Toolkit” (capital T) in headings

Files:

  • examples/agents/react/README.md
**/*

⚙️ CodeRabbit configuration file

**/*: # Code Review Instructions

  • Ensure the code follows best practices and coding standards. - For Python code, follow
    PEP 20 and
    PEP 8 for style guidelines.
  • Check for security vulnerabilities and potential issues. - Python methods should use type hints for all parameters and return values.
    Example:
    def my_function(param1: int, param2: str) -> bool:
        pass
  • For Python exception handling, ensure proper stack trace preservation:
    • When re-raising exceptions: use bare raise statements to maintain the original stack trace,
      and use logger.error() (not logger.exception()) to avoid duplicate stack trace output.
    • When catching and logging exceptions without re-raising: always use logger.exception()
      to capture the full stack trace information.

Documentation Review Instructions - Verify that documentation and comments are clear and comprehensive. - Verify that the documentation doesn't contain any TODOs, FIXMEs or placeholder text like "lorem ipsum". - Verify that the documentation doesn't contain any offensive or outdated terms. - Verify that documentation and comments are free of spelling mistakes, ensure the documentation doesn't contain any

words listed in the ci/vale/styles/config/vocabularies/nat/reject.txt file, words that might appear to be
spelling mistakes but are listed in the ci/vale/styles/config/vocabularies/nat/accept.txt file are OK.

Misc. - All code (except .mdc files that contain Cursor rules) should be licensed under the Apache License 2.0,

and should contain an Apache License 2.0 header comment at the top of each file.

  • Confirm that copyright years are up-to date whenever a file is changed.

Files:

  • examples/agents/react/README.md
examples/**/*

⚙️ CodeRabbit configuration file

examples/**/*: - This directory contains example code and usage scenarios for the toolkit, at a minimum an example should
contain a README.md or file README.ipynb.

  • If an example contains Python code, it should be placed in a subdirectory named src/ and should
    contain a pyproject.toml file. Optionally, it might also contain scripts in a scripts/ directory.
  • If an example contains YAML files, they should be placed in a subdirectory named configs/. - If an example contains sample data files, they should be placed in a subdirectory named data/, and should
    be checked into git-lfs.

Files:

  • examples/agents/react/README.md
🔇 Additional comments (1)
examples/agents/react/README.md (1)

147-159: Schema update looks great

The updated payloads now match the OpenAI-style messages schema for both non-streaming and streaming requests. Nicely done.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@willkill07 willkill07 self-assigned this Oct 6, 2025
@willkill07 willkill07 force-pushed the wkk_openai-schema-for-react-and-tool-calling-agents branch from cf971e1 to 31e3684 Compare October 6, 2025 17:54
@willkill07
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit eacf718 into NVIDIA:release/1.3 Oct 6, 2025
17 checks passed
@willkill07 willkill07 deleted the wkk_openai-schema-for-react-and-tool-calling-agents branch October 23, 2025 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Improvements or additions to documentation non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants