Skip to content

Conversation

@kasarolzzw
Copy link
Collaborator

ptaas

Co-Authored-By: Coda coda@bytedance.com

…treaming support

Change-Id: I54cf6b1895a94ee1c82d6384be711eeaaed4875f
Co-Authored-By: Coda <coda@bytedance.com>

refactor: [Coda] 重构execute_prompt和aexecute_prompt方法参数,统一底层传参方式

Change-Id: Ib480cc24e18ac2d68a0abf964aa29599b683d88f
Co-Authored-By: Coda <coda@bytedance.com>

feat: [Coda] refactor execute interfaces and enhance prompt entities

- Remove ExecuteParam exposure from entities directory
- Refactor _build_execute_request method parameters
- Restructure object definitions in internal/prompt/openapi.py
- Align object fields with cozeloop-go implementation
- Add base64_data field to ContentPart and improve converter.py
- Enhance execute and streaming functionality

Change-Id: I34d8f03f6b9de8b170f789562e71f92089ed6cfc
Co-Authored-By: Coda <coda@bytedance.com>

refactor: [Coda] merge duplicate _convert_to_result methods into unified converter
(LogID: 20250904221721010091104016861EFDC)

Co-Authored-By: Coda <coda@bytedance.com>

gitignore

Change-Id: I9042daa98841f3cd99036ccddeac04aa34695fde

feat: [Coda] 修复cozeloop-python流处理逻辑与Go版本保持一致

- 重构StreamProcessor类,统一数据前缀处理格式(data:)
- 实现完整的错误处理机制,包括错误前缀检测和累积器
- 添加对event:行的忽略处理,与Go版本保持一致
- 重构process_lines和aprocess_lines方法,消除重复代码
- 移除[DONE]标记处理,统一流结束检测逻辑
- 增强错误响应解析和RemoteServiceError异常处理

Change-Id: I910ea7182168eb55326c9e13aedf953f8718b180
Co-Authored-By: Coda <coda@bytedance.com>

feat: [Coda] 创建ptaas示例目录,提供execute_prompt和aexecute_prompt的完整使用示例
(LogID: 2025090500044019216800101072170CF)

Co-Authored-By: Coda <coda@bytedance.com>

fix: [Coda] 修复流式调用中httpx上下文管理器的headers访问错误
(LogID: 202509050038421921680010102185489)

Co-Authored-By: Coda <coda@bytedance.com>

feat: [Coda] remove StreamResponseWrapper and simplify post_stream to return httpx.Response directly
(LogID: 2025090500503319216800101012637F9)

Co-Authored-By: Coda <coda@bytedance.com>

feat: [Coda] implement context manager for StreamReader to fix post_stream context issue
(LogID: 20250905013341192168001010942E193)

Co-Authored-By: Coda <coda@bytedance.com>

refactor: [Coda] simplify ExecuteStreamReader to only accept stream_context
(LogID: 20250905013341192168001010942E193)

Co-Authored-By: Coda <coda@bytedance.com>

feat: [Coda] implement StreamReader based on Fornax Stream design
(LogID: 20250905020453192168001010730B720)

Co-Authored-By: Coda <coda@bytedance.com>

refactor: [Coda] remove Context classes, implement context manager directly in StreamReader
(LogID: 20250905020453192168001010730B720)

Co-Authored-By: Coda <coda@bytedance.com>

refactor: [Coda] replace execute_prompt with SSE-based implementation
(LogID: 20250905020453192168001010730B720)

Co-Authored-By: Coda <coda@bytedance.com>

ptaas

Change-Id: I3be6b974680ea03ecb387263f851d2b510715625

fix: [Coda] handle non-200 HTTP status in execute_stream post_stream
(LogID: 20250905140202010091104016024A92C)

Co-Authored-By: Coda <coda@bytedance.com>

fix: [Coda] restore stream architecture with delayed status check
(LogID: 20250905140202010091104016024A92C)

Co-Authored-By: Coda <coda@bytedance.com>

fix: [Coda] Correctly parse streaming errors to raise RemoteServiceError
(LogID: 20250905140202010091104016024A92C)

Co-Authored-By: Coda <coda@bytedance.com>

fix: [Coda] read response content before json() in stream error handling
(LogID: 20250905140202010091104016024A92C)

Co-Authored-By: Coda <coda@bytedance.com>

fix: [Coda] 修复ExecuteStreamReader close()方法AttributeError
(LogID: 202509051616010100911040169551803)

Co-Authored-By: Coda <coda@bytedance.com>

ptaas example

Change-Id: I46e0392a3f4e47b0f435b6ee34c6d15a46425fad

feat: [Coda] 重写PTaaS Python示例,参考Go版本保持场景和注释一致性
(LogID: 20250908180534010091104016071B631)

Co-Authored-By: Coda <coda@bytedance.com>

fix: [Coda] 添加同步流式示例并将所有PTaaS示例注释改为英文
(LogID: 20250908180534010091104016071B631)

Co-Authored-By: Coda <coda@bytedance.com>

fix: [Coda] 修复PTaaS异步流处理中的上下文管理器协议错误
(LogID: 2025090819310001009110401618550CC)

Co-Authored-By: Coda <coda@bytedance.com>

refactor: [Coda] 清理未使用的异步流处理方法
(LogID: 2025090819310001009110401618550CC)

Co-Authored-By: Coda <coda@bytedance.com>

feat: [Coda] add ConfigDict(use_enum_values=True) to models with enum fields
(LogID: 20250908201801010091104016415D94E)

Co-Authored-By: Coda <coda@bytedance.com>

ptaas example

Change-Id: If358626bdfa18dfc0e09bf5758e2950bef7fd800

feat: [Coda] add timeout parameter support for execute_prompt and aexecute_prompt methods
(LogID: 202509082041490100911040169244AFC)

Co-Authored-By: Coda <coda@bytedance.com>

feat: [Coda] set default timeout to 10min for execute_prompt and aexecute_prompt
(LogID: 202509082041490100911040169244AFC)

Co-Authored-By: Coda <coda@bytedance.com>

ptaas example

Change-Id: Ie8552a762bc1804e840132449869dee68a5e4b7f

delete useless example

Change-Id: I3f0a22ced554f372537a68ce8cb411239311f71f

delete useless example

Change-Id: Ibfd4f38295ab6f0635d3c9ab96579587f6d35a15
Change-Id: I885e86a70f3ef146163e234ffd1d8593cfe4e9f3
@kasarolzzw kasarolzzw merged commit a243909 into main Sep 10, 2025
4 checks passed
@kasarolzzw kasarolzzw deleted the feat-ptaas branch September 10, 2025 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants