process-gpt-agent-sdk 0.4.7__py3-none-any.whl → 0.4.9__py3-none-any.whl
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.7.dist-info → process_gpt_agent_sdk-0.4.9.dist-info}/METADATA +1 -1
- {process_gpt_agent_sdk-0.4.7.dist-info → process_gpt_agent_sdk-0.4.9.dist-info}/RECORD +5 -5
- processgpt_agent_sdk/processgpt_agent_framework.py +65 -10
- {process_gpt_agent_sdk-0.4.7.dist-info → process_gpt_agent_sdk-0.4.9.dist-info}/WHEEL +0 -0
- {process_gpt_agent_sdk-0.4.7.dist-info → process_gpt_agent_sdk-0.4.9.dist-info}/top_level.txt +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
processgpt_agent_sdk/__init__.py,sha256=MF4ij8yx4CgMljp86dPffsBtijxUbtDBpg3WxngN9ZA,1116
|
|
2
2
|
processgpt_agent_sdk/database.py,sha256=_vbeuiQXS-MGtVmE-GOlGdbT1mh2owg9py8_OqPZTdE,15222
|
|
3
|
-
processgpt_agent_sdk/processgpt_agent_framework.py,sha256
|
|
3
|
+
processgpt_agent_sdk/processgpt_agent_framework.py,sha256=AWywrGzrXhLdIDuEQZBQJB_o6tuzIkiXYvgmauxM3GE,27538
|
|
4
4
|
processgpt_agent_sdk/single_run.py,sha256=xI5s4neWQ4WE1Fx5_TiBwEypHRTgBFX1WODj-lZqGaY,1050
|
|
5
5
|
processgpt_agent_sdk/utils.py,sha256=Ucv4fZ4gXeTgX1TjmXJv_XjL7-bmEJ45tpW7i18TMac,9436
|
|
6
|
-
process_gpt_agent_sdk-0.4.
|
|
7
|
-
process_gpt_agent_sdk-0.4.
|
|
8
|
-
process_gpt_agent_sdk-0.4.
|
|
9
|
-
process_gpt_agent_sdk-0.4.
|
|
6
|
+
process_gpt_agent_sdk-0.4.9.dist-info/METADATA,sha256=gli8I7YoZ4rY_yxOKD-i2dqx1BZUGbNqFbNUioQb2Q4,6840
|
|
7
|
+
process_gpt_agent_sdk-0.4.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
process_gpt_agent_sdk-0.4.9.dist-info/top_level.txt,sha256=Xe6zrj3_3Vv7d0pl5RRtenVUckwOVBVLQn2P03j5REo,21
|
|
9
|
+
process_gpt_agent_sdk-0.4.9.dist-info/RECORD,,
|
|
@@ -139,7 +139,10 @@ class ProcessGPTRequestContext(RequestContext):
|
|
|
139
139
|
for u in users[:5]:
|
|
140
140
|
name = u.get("name", u.get("username", "Unknown"))
|
|
141
141
|
email = u.get("email", "")
|
|
142
|
-
|
|
142
|
+
user_str = f"{name}({email})" if email else name
|
|
143
|
+
# None 값 제거
|
|
144
|
+
if user_str and user_str != "None":
|
|
145
|
+
user_info.append(user_str)
|
|
143
146
|
logger.info("🔧 [Users 정보] user_info 리스트: %s", user_info)
|
|
144
147
|
logger.info("• Users (%d명): %s%s", len(users), ", ".join(user_info), "..." if len(users) > 5 else "")
|
|
145
148
|
else:
|
|
@@ -154,7 +157,10 @@ class ProcessGPTRequestContext(RequestContext):
|
|
|
154
157
|
name = a.get("name", a.get("username", "Unknown"))
|
|
155
158
|
tools = a.get("tools", "")
|
|
156
159
|
tool_str = f"[{tools}]" if tools else ""
|
|
157
|
-
|
|
160
|
+
agent_str = f"{name}{tool_str}"
|
|
161
|
+
# None 값 제거
|
|
162
|
+
if agent_str and agent_str != "None":
|
|
163
|
+
agent_info.append(agent_str)
|
|
158
164
|
logger.info("🔧 [Agents 정보] agent_info 리스트: %s", agent_info)
|
|
159
165
|
logger.info("• Agents (%d개): %s%s", len(agents), ", ".join(agent_info), "..." if len(agents) > 5 else "")
|
|
160
166
|
else:
|
|
@@ -316,38 +322,87 @@ class ProcessGPTEventQueue(EventQueue):
|
|
|
316
322
|
raise
|
|
317
323
|
|
|
318
324
|
def _extract_payload(self, event: Event) -> Any:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
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 {}
|
|
324
344
|
|
|
325
345
|
def _parse_json_or_text(self, value: Any) -> Any:
|
|
346
|
+
logger.info("🔧 [JSON 파싱 시작] value: %s (type: %s)", value, type(value).__name__)
|
|
347
|
+
|
|
326
348
|
if value is None:
|
|
349
|
+
logger.info("🔧 [JSON 파싱] None 값 -> 빈 객체 반환")
|
|
327
350
|
return {}
|
|
351
|
+
|
|
328
352
|
if isinstance(value, str):
|
|
329
353
|
text = value.strip()
|
|
354
|
+
logger.info("🔧 [JSON 파싱] 문자열 처리 - text: '%s' (길이: %d)", text, len(text))
|
|
330
355
|
if not text:
|
|
356
|
+
logger.info("🔧 [JSON 파싱] 빈 문자열 -> 빈 문자열 반환")
|
|
331
357
|
return ""
|
|
332
|
-
|
|
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
|
|
333
365
|
if hasattr(value, "model_dump") and callable(getattr(value, "model_dump")):
|
|
366
|
+
logger.info("🔧 [JSON 파싱] model_dump() 호출")
|
|
334
367
|
value = value.model_dump()
|
|
335
368
|
elif not isinstance(value, dict) and hasattr(value, "dict") and callable(getattr(value, "dict")):
|
|
369
|
+
logger.info("🔧 [JSON 파싱] dict() 호출")
|
|
336
370
|
value = value.dict()
|
|
337
371
|
elif not isinstance(value, dict) and hasattr(value, "__dict__"):
|
|
372
|
+
logger.info("🔧 [JSON 파싱] __dict__ 사용")
|
|
338
373
|
value = value.__dict__
|
|
374
|
+
|
|
339
375
|
if isinstance(value, dict):
|
|
376
|
+
logger.info("🔧 [JSON 파싱] 딕셔너리 처리 시작")
|
|
340
377
|
parts = value.get("parts")
|
|
341
378
|
if isinstance(parts, list) and parts:
|
|
379
|
+
logger.info("🔧 [JSON 파싱] parts 배열 처리 - parts: %s", parts)
|
|
342
380
|
first = parts[0] if isinstance(parts[0], dict) else None
|
|
343
381
|
if first and isinstance(first, dict):
|
|
344
382
|
txt = first.get("text") or first.get("content") or first.get("data")
|
|
383
|
+
logger.info("🔧 [JSON 파싱] parts[0]에서 텍스트 추출: %s", txt)
|
|
345
384
|
if isinstance(txt, str):
|
|
346
|
-
|
|
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
|
|
347
392
|
top_text = value.get("text") or value.get("content") or value.get("data")
|
|
393
|
+
logger.info("🔧 [JSON 파싱] 최상위 텍스트 추출: %s", top_text)
|
|
348
394
|
if isinstance(top_text, str):
|
|
349
|
-
|
|
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)
|
|
350
403
|
return value
|
|
404
|
+
|
|
405
|
+
logger.info("🔧 [JSON 파싱] 기타 타입 그대로 반환: %s", value)
|
|
351
406
|
return value
|
|
352
407
|
|
|
353
408
|
def task_done(self) -> None:
|
|
File without changes
|
{process_gpt_agent_sdk-0.4.7.dist-info → process_gpt_agent_sdk-0.4.9.dist-info}/top_level.txt
RENAMED
|
File without changes
|