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
Support context manager protocol for traced iterator APIs #3179
Conversation
promptflow-tracing test result 12 files 12 suites 7m 40s ⏱️ Results for commit c980736. ♻️ This comment has been updated with latest results. |
promptflow SDK CLI Azure E2E Test Result migu/context-manager 4 files 4 suites 4m 8s ⏱️ Results for commit c980736. ♻️ This comment has been updated with latest results. |
SDK CLI Global Config Test Result migu/context-manager6 tests 6 ✅ 1m 19s ⏱️ Results for commit c980736. ♻️ This comment has been updated with latest results. |
promptflow-core test result0 tests 0 ✅ 0s ⏱️ Results for commit c980736. ♻️ This comment has been updated with latest results. |
Executor Unit Test Result migu/context-manager796 tests 796 ✅ 3m 43s ⏱️ Results for commit c980736. ♻️ This comment has been updated with latest results. |
Executor E2E Test Result migu/context-manager246 tests 240 ✅ 5m 0s ⏱️ Results for commit c980736. ♻️ This comment has been updated with latest results. |
SDK CLI Test Result migu/context-manager 4 files 4 suites 1h 4m 55s ⏱️ Results for commit c980736. ♻️ This comment has been updated with latest results. |
bbd13d3
to
7ff6c89
Compare
Description
OpenAI SDK now returns Stream object for streaming Chat Completion API, which is a ContextManager as well as an Iterator.
When we wrap it for tracing, we need to ensure the wrapped object support both. Otherwise, client code leveraging context manager functionality will fail.
All Promptflow Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines