feat: associate generation calls with devices

This commit is contained in:
QiuSW
2026-07-21 09:40:40 +08:00
parent 69f4517958
commit 11c0d63ac8
16 changed files with 398 additions and 19 deletions
+2
View File
@@ -504,6 +504,7 @@ def precharge_call(
model_used: str = "",
resolution: str | None = None,
api_key=None,
client_device=None,
prompt: str = "",
) -> CallCharge:
points_cost = _validate_positive_points(points_cost)
@@ -524,6 +525,7 @@ def precharge_call(
call_record = CallRecord.objects.create(
user=user,
api_key=api_key,
client_device=client_device,
operation_type=operation_type,
alias=normalized_alias,
model_used=str(model_used or "").strip(),