Skip to content

added cookbook for batch api#5

Open
Baldur-Hua-ai20labs wants to merge 7 commits into
zerogpu:mainfrom
Baldur-Hua-ai20labs:batch-api-cookbook
Open

added cookbook for batch api#5
Baldur-Hua-ai20labs wants to merge 7 commits into
zerogpu:mainfrom
Baldur-Hua-ai20labs:batch-api-cookbook

Conversation

@Baldur-Hua-ai20labs

@Baldur-Hua-ai20labs Baldur-Hua-ai20labs commented Jun 9, 2026

Copy link
Copy Markdown

Adds a complete Batch API cookbook demonstrating how to tag a CSV of customer reviews overnight.

Includes:

  • End-to-end flow (CSV -> JSONL -> upload -> batch -> poll -> download -> merge)
  • Error handling and recovery using error_file_id
  • custom_id mapping for order-safe joins
  • Before/after CSV examples
  • Runnable Python script
  • Sample dataset and input.jsonl

Jira

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive cookbook for overnight batch customer-review tagging with step-by-step workflow, error recovery, resubmission patterns, and production tips.
    • Added a “Batch processing” tutorial card to the Cookbook homepage linking the new guide.
    • Included a sample JSONL input and a full Python example script demonstrating end-to-end processing and result merging.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Baldur-Hua-ai20labs, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 20 minutes and 20 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 001b5834-d189-4452-a5d8-7c89b3ff46fe

📥 Commits

Reviewing files that changed from the base of the PR and between 077227e and 26413a6.

📒 Files selected for processing (3)
  • cookbook/batch-review-tagging.mdx
  • cookbook/index.mdx
  • docs.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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 `@cookbook/batch-review-tagging.mdx`:
- Line 609: Update the example sentence in cookbook/batch-review-tagging.mdx
(the line starting "Cap batch size by your real SLO, not the 100 MB file
limit.") to remove the impossible "a million-line batch" example and replace it
with a realistic batch size within the Batch API limits (e.g., "a 50,000-line
batch" or "a batch near the 50k-line limit") so the guidance matches the
documented 50,000-line per-batch constraint and clarifies the recommendation to
pick chunk sizes that fit the completion_window.
- Line 609: Replace the incorrect "100 MB file limit" text with the correct
Batch API limit: "200 MB (209,715,200 bytes) file limit" in the sentence that
currently reads "**Cap batch size by your real SLO, not the 100 MB file
limit.**" (update the phrase so it reads "**Cap batch size by your real SLO, not
the 200 MB (209,715,200 bytes) file limit.**") to accurately reflect the API
limit in cookbook/batch-review-tagging.mdx.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 284e6a43-2e54-4515-a801-913396281c92

📥 Commits

Reviewing files that changed from the base of the PR and between fec4c27 and 35eaf15.

⛔ Files ignored due to path filters (1)
  • cookbook/batch-review-tagging/reviews.csv is excluded by !**/*.csv
📒 Files selected for processing (2)
  • cookbook/batch-review-tagging.mdx
  • cookbook/batch-review-tagging/input.jsonl

Comment thread cookbook/batch-review-tagging.mdx Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants