You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -112,7 +112,7 @@ The consolidation makes sense architecturally, but consider:
112
112
113
113
## Option 1: Status Quo
114
114
- Good: Clear separation of streaming vs non-streaming logic
115
-
- Good: Aligned with .NET design
115
+
- Good: Aligned with .NET design, although it is already `run` for Python and `RunAsync` for .NET
116
116
- Bad: Code duplication in decorators and middleware
117
117
- Bad: More complex client implementations
118
118
@@ -122,16 +122,26 @@ The consolidation makes sense architecturally, but consider:
122
122
- Good: Smaller API footprint for users to get familiar with
123
123
- Good: People using OpenAI directly already expect this pattern
124
124
- Bad: Increased complexity in decorators and middleware
125
-
- Bad: Less alignment with .NET design
125
+
- Bad: Less alignment with .NET design (`get_response(stream=True)` vs `GetStreamingResponseAsync`)
126
126
127
-
## Option 3: Consolidate + Merge Agent Methods
128
-
- Good: Further simplifies agent implementation
127
+
## Option 3: Consolidate + Merge Agent and Workflow Methods
128
+
- Good: Further simplifies agent and workflow implementation
129
129
- Good: Single method for all chat interactions
130
130
- Good: Smaller API footprint for users to get familiar with
131
131
- Good: People using OpenAI directly already expect this pattern
132
+
- Good: Workflows internally already use a single method (_run_workflow_with_tracing), so would eliminate public API duplication as well, with hardly any code changes
132
133
- Bad: More breaking changes for agent users
133
134
- Bad: Increased complexity in agent implementation
134
-
- Bad: More extensive misalignment with .NET design
135
+
- Bad: More extensive misalignment with .NET design (`run(stream=True)` vs `RunStreamingAsync` in addition to `get_response` change)
136
+
137
+
## Misc
138
+
139
+
Smaller questions to consider:
140
+
- Should default be `stream=False` or `stream=True`? (Current is False)
141
+
- Default to `False` makes it simpler for new users, as non-streaming is easier to handle.
142
+
- Default to `False` aligns with existing behavior.
143
+
- Streaming tends to be faster, so defaulting to `True` could improve performance for common use cases.
144
+
- Should this differ between ChatClient, Agent and Workflows? (e.g., Agent and Workflow defaults to streaming, ChatClient to non-streaming)
0 commit comments