process-gpt-agent-sdk 0.4.8__tar.gz → 0.4.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of process-gpt-agent-sdk might be problematic. Click here for more details.
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/PKG-INFO +1 -1
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/process_gpt_agent_sdk.egg-info/PKG-INFO +1 -1
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/processgpt_agent_sdk/processgpt_agent_framework.py +57 -8
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/pyproject.toml +1 -1
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/README.md +0 -0
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/process_gpt_agent_sdk.egg-info/SOURCES.txt +0 -0
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/process_gpt_agent_sdk.egg-info/dependency_links.txt +0 -0
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/process_gpt_agent_sdk.egg-info/requires.txt +0 -0
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/process_gpt_agent_sdk.egg-info/top_level.txt +0 -0
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/processgpt_agent_sdk/__init__.py +0 -0
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/processgpt_agent_sdk/database.py +0 -0
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/processgpt_agent_sdk/single_run.py +0 -0
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/processgpt_agent_sdk/utils.py +0 -0
- {process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/setup.cfg +0 -0
|
@@ -322,38 +322,87 @@ class ProcessGPTEventQueue(EventQueue):
|
|
|
322
322
|
raise
|
|
323
323
|
|
|
324
324
|
def _extract_payload(self, event: Event) -> Any:
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
325
|
+
try:
|
|
326
|
+
logger.info("🔧 [이벤트 페이로드 추출 시작] event_type: %s", type(event).__name__)
|
|
327
|
+
artifact_or_none = getattr(event, "artifact", None)
|
|
328
|
+
status_or_none = getattr(event, "status", None)
|
|
329
|
+
message_or_none = getattr(status_or_none, "message", None) if status_or_none else None
|
|
330
|
+
|
|
331
|
+
logger.info("🔧 [이벤트 페이로드] artifact: %s", artifact_or_none)
|
|
332
|
+
logger.info("🔧 [이벤트 페이로드] status: %s", status_or_none)
|
|
333
|
+
logger.info("🔧 [이벤트 페이로드] message: %s", message_or_none)
|
|
334
|
+
|
|
335
|
+
source = artifact_or_none if artifact_or_none is not None else message_or_none
|
|
336
|
+
logger.info("🔧 [이벤트 페이로드] source: %s (type: %s)", source, type(source).__name__)
|
|
337
|
+
|
|
338
|
+
result = self._parse_json_or_text(source)
|
|
339
|
+
logger.info("🔧 [이벤트 페이로드] 파싱 결과: %s (type: %s)", result, type(result).__name__)
|
|
340
|
+
return result
|
|
341
|
+
except Exception as e:
|
|
342
|
+
logger.error("❌ [이벤트 페이로드 추출 실패] %s", str(e), exc_info=e)
|
|
343
|
+
return {}
|
|
330
344
|
|
|
331
345
|
def _parse_json_or_text(self, value: Any) -> Any:
|
|
346
|
+
logger.info("🔧 [JSON 파싱 시작] value: %s (type: %s)", value, type(value).__name__)
|
|
347
|
+
|
|
332
348
|
if value is None:
|
|
349
|
+
logger.info("🔧 [JSON 파싱] None 값 -> 빈 객체 반환")
|
|
333
350
|
return {}
|
|
351
|
+
|
|
334
352
|
if isinstance(value, str):
|
|
335
353
|
text = value.strip()
|
|
354
|
+
logger.info("🔧 [JSON 파싱] 문자열 처리 - text: '%s' (길이: %d)", text, len(text))
|
|
336
355
|
if not text:
|
|
356
|
+
logger.info("🔧 [JSON 파싱] 빈 문자열 -> 빈 문자열 반환")
|
|
337
357
|
return ""
|
|
338
|
-
|
|
358
|
+
try:
|
|
359
|
+
result = json.loads(text)
|
|
360
|
+
logger.info("🔧 [JSON 파싱] JSON 파싱 성공: %s", result)
|
|
361
|
+
return result
|
|
362
|
+
except json.JSONDecodeError as e:
|
|
363
|
+
logger.error("❌ [JSON 파싱] JSON 파싱 실패: %s - 원본 텍스트: '%s'", str(e), text)
|
|
364
|
+
return text
|
|
339
365
|
if hasattr(value, "model_dump") and callable(getattr(value, "model_dump")):
|
|
366
|
+
logger.info("🔧 [JSON 파싱] model_dump() 호출")
|
|
340
367
|
value = value.model_dump()
|
|
341
368
|
elif not isinstance(value, dict) and hasattr(value, "dict") and callable(getattr(value, "dict")):
|
|
369
|
+
logger.info("🔧 [JSON 파싱] dict() 호출")
|
|
342
370
|
value = value.dict()
|
|
343
371
|
elif not isinstance(value, dict) and hasattr(value, "__dict__"):
|
|
372
|
+
logger.info("🔧 [JSON 파싱] __dict__ 사용")
|
|
344
373
|
value = value.__dict__
|
|
374
|
+
|
|
345
375
|
if isinstance(value, dict):
|
|
376
|
+
logger.info("🔧 [JSON 파싱] 딕셔너리 처리 시작")
|
|
346
377
|
parts = value.get("parts")
|
|
347
378
|
if isinstance(parts, list) and parts:
|
|
379
|
+
logger.info("🔧 [JSON 파싱] parts 배열 처리 - parts: %s", parts)
|
|
348
380
|
first = parts[0] if isinstance(parts[0], dict) else None
|
|
349
381
|
if first and isinstance(first, dict):
|
|
350
382
|
txt = first.get("text") or first.get("content") or first.get("data")
|
|
383
|
+
logger.info("🔧 [JSON 파싱] parts[0]에서 텍스트 추출: %s", txt)
|
|
351
384
|
if isinstance(txt, str):
|
|
352
|
-
|
|
385
|
+
try:
|
|
386
|
+
result = json.loads(txt)
|
|
387
|
+
logger.info("🔧 [JSON 파싱] parts 텍스트 JSON 파싱 성공: %s", result)
|
|
388
|
+
return result
|
|
389
|
+
except Exception as e:
|
|
390
|
+
logger.error("❌ [JSON 파싱] parts 텍스트 JSON 파싱 실패: %s", str(e))
|
|
391
|
+
return txt
|
|
353
392
|
top_text = value.get("text") or value.get("content") or value.get("data")
|
|
393
|
+
logger.info("🔧 [JSON 파싱] 최상위 텍스트 추출: %s", top_text)
|
|
354
394
|
if isinstance(top_text, str):
|
|
355
|
-
|
|
395
|
+
try:
|
|
396
|
+
result = json.loads(top_text)
|
|
397
|
+
logger.info("🔧 [JSON 파싱] 최상위 텍스트 JSON 파싱 성공: %s", result)
|
|
398
|
+
return result
|
|
399
|
+
except Exception as e:
|
|
400
|
+
logger.error("❌ [JSON 파싱] 최상위 텍스트 JSON 파싱 실패: %s", str(e))
|
|
401
|
+
return top_text
|
|
402
|
+
logger.info("🔧 [JSON 파싱] 딕셔너리 그대로 반환: %s", value)
|
|
356
403
|
return value
|
|
404
|
+
|
|
405
|
+
logger.info("🔧 [JSON 파싱] 기타 타입 그대로 반환: %s", value)
|
|
357
406
|
return value
|
|
358
407
|
|
|
359
408
|
def task_done(self) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/processgpt_agent_sdk/__init__.py
RENAMED
|
File without changes
|
{process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/processgpt_agent_sdk/database.py
RENAMED
|
File without changes
|
{process_gpt_agent_sdk-0.4.8 → process_gpt_agent_sdk-0.4.9}/processgpt_agent_sdk/single_run.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|