docs: improve README - #2
Conversation
📝 WalkthroughWalkthroughThe README adds two leading blank lines and corrects the example API request to use ChangesREADME API example
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 55: Update the README curl example to include the required bot field in
its JSON request body, using the expected bot identifier while preserving the
existing cookie, formkey, and message fields.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| ### Example | ||
| ```bash | ||
| curl http://127.0.0.1/chat/capybara -d '{"Cookie: m-b=xxxx" , "formkey: xxxxx", "message":"What is the meaning of life?"}' | ||
| curl -X POST http://127.0.0.1:8000/chat/capybara -H "Content-Type: application/json" -d '{"cookie": "m-b=xxxx", "formkey": "xxxxx", "message": "What is the meaning of life?"}' |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Include the required bot field in the request body.
api.py:17-21 declares bot as required, and api.py:23-88 reads options.bot. This request omits the field, so FastAPI returns HTTP 422 before the handler runs.
Proposed fix
-curl -X POST http://127.0.0.1:8000/chat/capybara -H "Content-Type: application/json" -d '{"cookie": "m-b=xxxx", "formkey": "xxxxx", "message": "What is the meaning of life?"}'
+curl -X POST http://127.0.0.1:8000/chat/capybara -H "Content-Type: application/json" -d '{"bot": "capybara", "cookie": "m-b=xxxx", "formkey": "xxxxx", "message": "What is the meaning of life?"}'📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| curl -X POST http://127.0.0.1:8000/chat/capybara -H "Content-Type: application/json" -d '{"cookie": "m-b=xxxx", "formkey": "xxxxx", "message": "What is the meaning of life?"}' | |
| curl -X POST http://127.0.0.1:8000/chat/capybara -H "Content-Type: application/json" -d '{"bot": "capybara", "cookie": "m-b=xxxx", "formkey": "xxxxx", "message": "What is the meaning of life?"}' |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` at line 55, Update the README curl example to include the required
bot field in its JSON request body, using the expected bot identifier while
preserving the existing cookie, formkey, and message fields.
Makes one small, focused improvement to the existing README.
Summary by CodeRabbit