-
Notifications
You must be signed in to change notification settings - Fork 138
feat: initial implementation of openai responses api #1429
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
Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
- Implement unit tests for the OpenAI responses translator in `openai_responses_test.go`, covering request body handling, response body processing, streaming response handling, and error conversion. - Introduce metrics tests in `responses_metrics_test.go` to validate token usage and latency recording. - Enhance tracing tests in `api_test.go`, `request_attrs_test.go`, `response_attrs_test.go`, and `responses_test.go` to ensure proper attribute recording for requests and responses. - Add tests for the responses span in `span_test.go` to verify correct behavior during response recording and error handling. - Validate the responses tracer exporter behavior in `tracing_test.go` to ensure correct integration with OpenTelemetry. Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
…ckage Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
… body Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
ee26893 to
a588b67
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1429 +/- ##
==========================================
+ Coverage 83.67% 83.79% +0.11%
==========================================
Files 139 143 +4
Lines 12302 12822 +520
==========================================
+ Hits 10294 10744 +450
- Misses 1400 1445 +45
- Partials 608 633 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… methods in responsesProcessorUpstreamFilter Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
a70d9da to
f783d51
Compare
|
let me get back to this one next week -- this week we will release v0.4 and the kubecon is coming next week so not sure if we can have much cycles to help this land 🙏 |
**Description** This consolidates all the copy-pasted processors that existed per endpoint we support into one generic processor. This was made possible thanks to the series of refactoring that we landed in the past few weeks primarily for dynamic module work #90. Notably, now in order to add an endpoint, majority of the new code will be in translator (where also have shared generic interface) as well as the type definition. No longer it requires the huge copy paste of processors. **Related Issues/PRs (if applicable)** Resolves #1083 Blocker for #1429 #1584 #1592 #1594 --------- Signed-off-by: Takeshi Yoneda <[email protected]> Co-authored-by: Ignasi Barrera <[email protected]>
|
hey @sivanantha321 -- sorry for the delay. So we have done bunch of refactoring in the past. translator and schema definition here can be reused almost as-is, but as for others, most code can be deleted as we switched to a generic implementation with an "endpoint spec" declaration in the new internal/endpointspec package. Let me know if you are willing to resume the work (no pressure) and until then, i am going to mark this PR as draft |
|
@mathetake Sure. I will refactor and push the changes. |
|
I am closing this PR and will raise a new PR. |
Description
Related Issues/PRs (if applicable)
Special notes for reviewers (if applicable)