feat(ai-studio): clarify hosted model tiers
This commit is contained in:
+12
-1
@@ -57,7 +57,7 @@ def _format_image_studio_event(event):
|
||||
if result:
|
||||
prefix += f":{result}"
|
||||
if detail:
|
||||
prefix += f",{diagnostics.redact_log_text(detail)}"
|
||||
prefix += f",{_image_studio_user_detail(detail)}"
|
||||
if event.get("points_cost") is not None:
|
||||
prefix += f",扣点 {event.get('points_cost')}"
|
||||
if event.get("points_balance") is not None:
|
||||
@@ -65,6 +65,17 @@ def _format_image_studio_event(event):
|
||||
return prefix
|
||||
|
||||
|
||||
def _image_studio_user_detail(detail):
|
||||
text = diagnostics.redact_log_text(str(detail or "")).replace("\r", " ").replace("\n", " ").strip()
|
||||
text = _USER_LOG_URL_RE.sub("[链接已隐藏]", text)
|
||||
text = _USER_LOG_PATH_RE.sub("[接口路径已隐藏]", text)
|
||||
text = text.replace("GET [链接已隐藏]", "请求 cmhub")
|
||||
text = text.replace("POST [链接已隐藏]", "请求 cmhub")
|
||||
if len(text) > 180:
|
||||
return text[:177] + "..."
|
||||
return text
|
||||
|
||||
|
||||
class ImageStudioPullImagesWorker(BaseWorker):
|
||||
"""Read Shopee main image URLs for one AI studio project in background."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user