process-gpt-agent-sdk 0.4.9__tar.gz → 0.4.10__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.9 → process_gpt_agent_sdk-0.4.10}/PKG-INFO +1 -1
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/process_gpt_agent_sdk.egg-info/PKG-INFO +1 -1
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/processgpt_agent_sdk/processgpt_agent_framework.py +35 -18
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/pyproject.toml +1 -1
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/README.md +0 -0
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/process_gpt_agent_sdk.egg-info/SOURCES.txt +0 -0
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/process_gpt_agent_sdk.egg-info/dependency_links.txt +0 -0
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/process_gpt_agent_sdk.egg-info/requires.txt +0 -0
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/process_gpt_agent_sdk.egg-info/top_level.txt +0 -0
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/processgpt_agent_sdk/__init__.py +0 -0
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/processgpt_agent_sdk/database.py +0 -0
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/processgpt_agent_sdk/single_run.py +0 -0
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/processgpt_agent_sdk/utils.py +0 -0
- {process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/setup.cfg +0 -0
|
@@ -355,12 +355,17 @@ class ProcessGPTEventQueue(EventQueue):
|
|
|
355
355
|
if not text:
|
|
356
356
|
logger.info("🔧 [JSON 파싱] 빈 문자열 -> 빈 문자열 반환")
|
|
357
357
|
return ""
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
358
|
+
# JSON인지 먼저 확인 (중괄호나 대괄호로 시작하는지)
|
|
359
|
+
if text.startswith(('{', '[')):
|
|
360
|
+
try:
|
|
361
|
+
result = json.loads(text)
|
|
362
|
+
logger.info("🔧 [JSON 파싱] JSON 파싱 성공: %s", result)
|
|
363
|
+
return result
|
|
364
|
+
except json.JSONDecodeError as e:
|
|
365
|
+
logger.debug("🔧 [JSON 파싱] JSON 파싱 실패 - 텍스트로 처리: %s", str(e))
|
|
366
|
+
return text
|
|
367
|
+
else:
|
|
368
|
+
logger.debug("🔧 [JSON 파싱] 문자열은 JSON 형태가 아님 - 텍스트로 처리")
|
|
364
369
|
return text
|
|
365
370
|
if hasattr(value, "model_dump") and callable(getattr(value, "model_dump")):
|
|
366
371
|
logger.info("🔧 [JSON 파싱] model_dump() 호출")
|
|
@@ -382,22 +387,34 @@ class ProcessGPTEventQueue(EventQueue):
|
|
|
382
387
|
txt = first.get("text") or first.get("content") or first.get("data")
|
|
383
388
|
logger.info("🔧 [JSON 파싱] parts[0]에서 텍스트 추출: %s", txt)
|
|
384
389
|
if isinstance(txt, str):
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
390
|
+
# JSON인지 먼저 확인 (중괄호나 대괄호로 시작하는지)
|
|
391
|
+
txt_stripped = txt.strip()
|
|
392
|
+
if txt_stripped.startswith(('{', '[')):
|
|
393
|
+
try:
|
|
394
|
+
result = json.loads(txt)
|
|
395
|
+
logger.info("🔧 [JSON 파싱] parts 텍스트 JSON 파싱 성공: %s", result)
|
|
396
|
+
return result
|
|
397
|
+
except Exception as e:
|
|
398
|
+
logger.debug("🔧 [JSON 파싱] parts 텍스트 JSON 파싱 실패 - 텍스트로 처리: %s", str(e))
|
|
399
|
+
return txt
|
|
400
|
+
else:
|
|
401
|
+
logger.debug("🔧 [JSON 파싱] parts 텍스트는 JSON 형태가 아님 - 텍스트로 처리")
|
|
391
402
|
return txt
|
|
392
403
|
top_text = value.get("text") or value.get("content") or value.get("data")
|
|
393
404
|
logger.info("🔧 [JSON 파싱] 최상위 텍스트 추출: %s", top_text)
|
|
394
405
|
if isinstance(top_text, str):
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
406
|
+
# JSON인지 먼저 확인 (중괄호나 대괄호로 시작하는지)
|
|
407
|
+
top_text_stripped = top_text.strip()
|
|
408
|
+
if top_text_stripped.startswith(('{', '[')):
|
|
409
|
+
try:
|
|
410
|
+
result = json.loads(top_text)
|
|
411
|
+
logger.info("🔧 [JSON 파싱] 최상위 텍스트 JSON 파싱 성공: %s", result)
|
|
412
|
+
return result
|
|
413
|
+
except Exception as e:
|
|
414
|
+
logger.debug("🔧 [JSON 파싱] 최상위 텍스트 JSON 파싱 실패 - 텍스트로 처리: %s", str(e))
|
|
415
|
+
return top_text
|
|
416
|
+
else:
|
|
417
|
+
logger.debug("🔧 [JSON 파싱] 최상위 텍스트는 JSON 형태가 아님 - 텍스트로 처리")
|
|
401
418
|
return top_text
|
|
402
419
|
logger.info("🔧 [JSON 파싱] 딕셔너리 그대로 반환: %s", value)
|
|
403
420
|
return value
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/processgpt_agent_sdk/__init__.py
RENAMED
|
File without changes
|
{process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/processgpt_agent_sdk/database.py
RENAMED
|
File without changes
|
{process_gpt_agent_sdk-0.4.9 → process_gpt_agent_sdk-0.4.10}/processgpt_agent_sdk/single_run.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|