mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
Fix serialization to use str() instead of repr() for better custom object output
- Change to_serializable() to use str(obj) instead of repr(obj) for unknown objects - This provides more meaningful serialization output for custom objects with __str__ methods - Regenerate VCR cassette for DataFrame test to include complete API interactions - Fixes test_interpolate_custom_object_validation expecting '5' in serialized output Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -68,7 +68,7 @@ def to_serializable(
|
|||||||
_current_depth=_current_depth + 1,
|
_current_depth=_current_depth + 1,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return repr(obj)
|
return str(obj)
|
||||||
|
|
||||||
|
|
||||||
def _to_serializable_key(key: Any) -> str:
|
def _to_serializable_key(key: Any) -> str:
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ interactions:
|
|||||||
Content-Length:
|
Content-Length:
|
||||||
- '144138'
|
- '144138'
|
||||||
Date:
|
Date:
|
||||||
- Sat, 31 May 2025 19:53:39 GMT
|
- Sat, 31 May 2025 20:07:51 GMT
|
||||||
Permissions-Policy:
|
Permissions-Policy:
|
||||||
- publickey-credentials-create=(self),publickey-credentials-get=(self),accelerometer=(),ambient-light-sensor=(),autoplay=(),battery=(),camera=(),display-capture=(),document-domain=(),encrypted-media=(),execution-while-not-rendered=(),execution-while-out-of-viewport=(),fullscreen=(),gamepad=(),geolocation=(),gyroscope=(),hid=(),identity-credentials-get=(),idle-detection=(),local-fonts=(),magnetometer=(),microphone=(),midi=(),otp-credentials=(),payment=(),picture-in-picture=(),screen-wake-lock=(),serial=(),speaker-selection=(),storage-access=(),usb=(),web-share=(),xr-spatial-tracking=()
|
- publickey-credentials-create=(self),publickey-credentials-get=(self),accelerometer=(),ambient-light-sensor=(),autoplay=(),battery=(),camera=(),display-capture=(),document-domain=(),encrypted-media=(),execution-while-not-rendered=(),execution-while-out-of-viewport=(),fullscreen=(),gamepad=(),geolocation=(),gyroscope=(),hid=(),identity-credentials-get=(),idle-detection=(),local-fonts=(),magnetometer=(),microphone=(),midi=(),otp-credentials=(),payment=(),picture-in-picture=(),screen-wake-lock=(),serial=(),speaker-selection=(),storage-access=(),usb=(),web-share=(),xr-spatial-tracking=()
|
||||||
Strict-Transport-Security:
|
Strict-Transport-Security:
|
||||||
@@ -66,9 +66,9 @@ interactions:
|
|||||||
X-Permitted-Cross-Domain-Policies:
|
X-Permitted-Cross-Domain-Policies:
|
||||||
- none
|
- none
|
||||||
X-Served-By:
|
X-Served-By:
|
||||||
- cache-iad-kjyo7100125-IAD, cache-iad-kjyo7100044-IAD, cache-bfi-krnt7300077-BFI
|
- cache-iad-kjyo7100125-IAD, cache-iad-kjyo7100044-IAD, cache-bfi-krnt7300026-BFI
|
||||||
X-Timer:
|
X-Timer:
|
||||||
- S1748721219.226870,VS0,VE2
|
- S1748722071.124994,VS0,VE1
|
||||||
X-XSS-Protection:
|
X-XSS-Protection:
|
||||||
- 1; mode=block
|
- 1; mode=block
|
||||||
access-control-allow-headers:
|
access-control-allow-headers:
|
||||||
@@ -167,8 +167,10 @@ interactions:
|
|||||||
\ \"type\": \"invalid_request_error\",\n \"param\": null,\n \"code\":
|
\ \"type\": \"invalid_request_error\",\n \"param\": null,\n \"code\":
|
||||||
\"invalid_api_key\"\n }\n}\n"
|
\"invalid_api_key\"\n }\n}\n"
|
||||||
headers:
|
headers:
|
||||||
|
CF-Cache-Status:
|
||||||
|
- DYNAMIC
|
||||||
CF-RAY:
|
CF-RAY:
|
||||||
- 948904c4999d1f9a-SEA
|
- 94891990e9ca75f1-SEA
|
||||||
Connection:
|
Connection:
|
||||||
- keep-alive
|
- keep-alive
|
||||||
Content-Length:
|
Content-Length:
|
||||||
@@ -176,27 +178,25 @@ interactions:
|
|||||||
Content-Type:
|
Content-Type:
|
||||||
- application/json; charset=utf-8
|
- application/json; charset=utf-8
|
||||||
Date:
|
Date:
|
||||||
- Sat, 31 May 2025 19:53:39 GMT
|
- Sat, 31 May 2025 20:07:51 GMT
|
||||||
Server:
|
Server:
|
||||||
- cloudflare
|
- cloudflare
|
||||||
Set-Cookie:
|
Set-Cookie:
|
||||||
- __cf_bm=pl08GXjlh8ZlFKjF10N5pD2MdKFHsw4idM1LLzh0z6o-1748721219-1.0.1.1-HPLjxK1pX1vDBORs3o6rDB2hZxTNU9iCzEmvGNX1dldI8HgAZ6YInBKraZ_pZIKskdbpVoTZl6IwaBfA9n6HK95pOaeqVDJgZsyi1Cjoz8w;
|
- __cf_bm=09gKIib81QGM572HIGBmZOYd9OFA7Yu3XcPOFlzpELk-1748722071-1.0.1.1-8a5HPfQDIdpVsOQZDkHvoTzET0ZU363KSXEMJzYLp0RhAw6gVGNMIBSvsHvXU01Wo2GDYjbKAjiNNO847YpGaf0z.yRdd1vuku2SZOrS600;
|
||||||
path=/; expires=Sat, 31-May-25 20:23:39 GMT; domain=.api.openai.com; HttpOnly;
|
path=/; expires=Sat, 31-May-25 20:37:51 GMT; domain=.api.openai.com; HttpOnly;
|
||||||
Secure; SameSite=None
|
Secure; SameSite=None
|
||||||
- _cfuvid=vKsJDmmldBMI8LqS2p.XKRV7ieUbTg6805.MZE2adFk-1748721219407-0.0.1.1-604800000;
|
- _cfuvid=0u9K62rx.6sck3G_HbM4lY3P6JdhwBgTmKwn2f.u3EU-1748722071298-0.0.1.1-604800000;
|
||||||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
||||||
X-Content-Type-Options:
|
X-Content-Type-Options:
|
||||||
- nosniff
|
- nosniff
|
||||||
alt-svc:
|
alt-svc:
|
||||||
- h3=":443"; ma=86400
|
- h3=":443"; ma=86400
|
||||||
cf-cache-status:
|
|
||||||
- DYNAMIC
|
|
||||||
strict-transport-security:
|
strict-transport-security:
|
||||||
- max-age=31536000; includeSubDomains; preload
|
- max-age=31536000; includeSubDomains; preload
|
||||||
vary:
|
vary:
|
||||||
- Origin
|
- Origin
|
||||||
x-request-id:
|
x-request-id:
|
||||||
- req_4bf812b1540c3c2fec987186cd3be168
|
- req_b6500475f0c7bf43eafd2d28496f4d80
|
||||||
status:
|
status:
|
||||||
code: 401
|
code: 401
|
||||||
message: Unauthorized
|
message: Unauthorized
|
||||||
|
|||||||
Reference in New Issue
Block a user