-
Notifications
You must be signed in to change notification settings - Fork 0
adapt : GitHub provider #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughThe changes refactor the OpenAI streaming flow from fetch-based to axios-based with incremental chunk processing, implement transparent billing by extracting costs from response headers, add an output text extraction utility to normalize diverse response shapes, and update string literal types from single to double quotes. A Vercel SPA rewrite configuration was also added. Changes
Sequence DiagramsequenceDiagram
participant User
participant ChatPlayground
participant axiosClient
participant OpenAI API
User->>ChatPlayground: Submit chat request
ChatPlayground->>axiosClient: post with onDownloadProgress
axiosClient->>OpenAI API: Stream request
loop Chunk Reception
OpenAI API-->>axiosClient: SSE-like data chunks
axiosClient->>ChatPlayground: onDownloadProgress callback
ChatPlayground->>ChatPlayground: Buffer & parse chunks
ChatPlayground->>ChatPlayground: Extract delta, append to message
ChatPlayground->>User: Render streamed content
end
OpenAI API-->>axiosClient: Response complete + headers
axiosClient->>ChatPlayground: Extract billing headers<br/>(openai-input-cost, etc.)
ChatPlayground->>ChatPlayground: Store in lastRun.BillingMeta
ChatPlayground->>ChatPlayground: extractOutputText(response)
ChatPlayground->>User: Display final message + receipt
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
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 |
PR Checklist
Please read and check all that apply.
Changesets
.changeset/describing the change (patch/minor/major) with a clear, user-focused summaryskip-changesetlabelQuality
bun run build(Vite)playwright,vitestif used)Notes
bun run changesetaidocs/changesets.mdSummary by CodeRabbit
New Features
Bug Fixes
Chores