ref(openai): Separate output handling#5543
ref(openai): Separate output handling#5543alexander-alderman-webb wants to merge 3 commits intomasterfrom
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛Openai
Other
Documentation 📚
Internal Changes 🔧Agents
Openai Agents
Other
🤖 This preview updates automatically when you update the PR. |
Codecov Results 📊✅ 31 passed | Total: 31 | Pass Rate: 100% | Execution Time: 12.97s 📊 Comparison with Base Branch
All tests are passing successfully. ❌ Patch coverage is 30.00%. Project has 14375 uncovered lines. Files with missing lines (181)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 26.45% 27.57% +1.12%
==========================================
Files 189 189 —
Lines 19830 19846 +16
Branches 6428 6432 +4
==========================================
+ Hits 5246 5471 +225
- Misses 14584 14375 -209
- Partials 457 488 +31Generated by Codecov Action |
ericapisani
left a comment
There was a problem hiding this comment.
Couple of naming things but otherwise LGTM.
| kwargs: "dict[str, Any]", | ||
| integration: "OpenAIIntegration", | ||
| start_time: "Optional[float]" = None, | ||
| finish_span: bool = True, |
There was a problem hiding this comment.
Nit: I can see there being a possibility that the name finish_span could be interpreted as the "ending span" (a noun) rather than "mark the span as finished" (a verb/action).
If it's not a massive pain, it might be worth renaming to mark_span_as_finished
|
|
||
|
|
||
| def _set_output_data( | ||
| def _common_set_output_data( |
There was a problem hiding this comment.
Nit: _set_common_output_data
Description
Create separate functions for output-handling of
openaiResponses, Completions, and Embedding API functions. Create streaming variants where applicable.Issues
Reminders
tox -e linters.feat:,fix:,ref:,meta:)