coze-coding-utils 0.1.9__py3-none-any.whl → 0.1.10__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.
@@ -1,3 +1,3 @@
1
1
  __all__ = []
2
2
 
3
- __version__ = "0.1.9"
3
+ __version__ = "0.1.10"
@@ -8,11 +8,11 @@ HEADER_X_TT_LOGID = "x-tt-logid"
8
8
  HEADER_X_TT_ENV = "x-tt-env"
9
9
  HEADER_X_USE_PPE = "x-use-ppe"
10
10
  HEADER_X_TT_ENV_FE = "x-tt-env-fe"
11
- HEADER_RPC_PERSIST_REC_REC_BIZ_SCENE = "rpc-persist-rec-rec-biz-scene"
11
+ HEADER_RPC_PERSIST_RES_REC_BIZ_SCENE = "rpc-persist-res-rec-biz-scene"
12
12
  HEADER_RPC_PERSIST_COZE_RECORD_ROOT_ID = "rpc-persist-coze-record-root-id" # root_id,串联一次完整请求,通常标识一次完整对话
13
- HEADER_RPC_PERSIST_REC_ROOT_ENTITY_TYPE = "rpc-persist-rec-rec-root-entity-type" # 对应最顶层实体类型,用于标识资源消耗的来源归属实体
14
- HEADER_RPC_PERSIST_REC_ROOT_ENTITY_ID = "rpc-persist-rec-rec-root-entity-id" #对应最顶层实体ID
15
- HEADER_RPC_PERSIST_REC_REC_EXT_INFO = "rpc-persist-rec-rec-ext-info" # 扩展信息,json字符串格式
13
+ HEADER_RPC_PERSIST_RES_REC_ROOT_ENTITY_TYPE = "rpc-persist-res-rec-root-entity-type" # 对应最顶层实体类型,用于标识资源消耗的来源归属实体
14
+ HEADER_RPC_PERSIST_RES_REC_ROOT_ENTITY_ID = "rpc-persist-res-rec-root-entity-id" #对应最顶层实体ID
15
+ HEADER_RPC_PERSIST_RES_REC_EXT_INFO = "rpc-persist-res-rec-ext-info" # 扩展信息,json字符串格式
16
16
 
17
17
  # Environment variable keys
18
18
  ENV_SPACE_ID = "COZE_PROJECT_SPACE_ID"
@@ -32,11 +32,11 @@ class Context:
32
32
  x_use_ppe: Optional[str] = None
33
33
  x_tt_env_fe: Optional[str] = None
34
34
 
35
- rpc_persist_rec_rec_biz_scene: Optional[str] = None
35
+ rpc_persist_res_rec_biz_scene: Optional[str] = None
36
36
  rpc_persist_coze_record_root_id: Optional[str] = None
37
- rpc_persist_rec_root_entity_type: Optional[str] = None
38
- rpc_persist_rec_root_entity_id: Optional[str] = None
39
- rpc_persist_rec_rec_ext_info: Optional[str] = None
37
+ rpc_persist_res_rec_root_entity_type: Optional[str] = None
38
+ rpc_persist_res_rec_root_entity_id: Optional[str] = None
39
+ rpc_persist_res_rec_ext_info: Optional[str] = None
40
40
 
41
41
 
42
42
  def new_context(method: str, headers: Optional[Mapping[str, str]] = None) -> Context:
@@ -54,11 +54,11 @@ def new_context(method: str, headers: Optional[Mapping[str, str]] = None) -> Con
54
54
  HEADER_X_TT_ENV: "x_tt_env",
55
55
  HEADER_X_USE_PPE: "x_use_ppe",
56
56
  HEADER_X_TT_ENV_FE: "x_tt_env_fe",
57
- HEADER_RPC_PERSIST_REC_REC_BIZ_SCENE: "rpc_persist_rec_rec_biz_scene",
57
+ HEADER_RPC_PERSIST_RES_REC_BIZ_SCENE: "rpc_persist_res_rec_biz_scene",
58
58
  HEADER_RPC_PERSIST_COZE_RECORD_ROOT_ID: "rpc_persist_coze_record_root_id",
59
- HEADER_RPC_PERSIST_REC_ROOT_ENTITY_TYPE: "rpc_persist_rec_root_entity_type",
60
- HEADER_RPC_PERSIST_REC_ROOT_ENTITY_ID: "rpc_persist_rec_root_entity_id",
61
- HEADER_RPC_PERSIST_REC_REC_EXT_INFO: "rpc_persist_rec_rec_ext_info",
59
+ HEADER_RPC_PERSIST_RES_REC_ROOT_ENTITY_TYPE: "rpc_persist_res_rec_root_entity_type",
60
+ HEADER_RPC_PERSIST_RES_REC_ROOT_ENTITY_ID: "rpc_persist_res_rec_root_entity_id",
61
+ HEADER_RPC_PERSIST_RES_REC_EXT_INFO: "rpc_persist_res_rec_ext_info",
62
62
  }
63
63
  for hk, attr in HEADERS_TO_ATTR.items():
64
64
  val = norm.get(hk)
@@ -77,11 +77,11 @@ def default_headers(ctx: Context | None) -> Dict[str, str]:
77
77
  "x_tt_env": HEADER_X_TT_ENV,
78
78
  "x_use_ppe": HEADER_X_USE_PPE,
79
79
  "x_tt_env_fe": HEADER_X_TT_ENV_FE,
80
- "rpc_persist_rec_rec_biz_scene": HEADER_RPC_PERSIST_REC_REC_BIZ_SCENE,
80
+ "rpc_persist_res_rec_biz_scene": HEADER_RPC_PERSIST_RES_REC_BIZ_SCENE,
81
81
  "rpc_persist_coze_record_root_id": HEADER_RPC_PERSIST_COZE_RECORD_ROOT_ID,
82
- "rpc_persist_rec_root_entity_type": HEADER_RPC_PERSIST_REC_ROOT_ENTITY_TYPE,
83
- "rpc_persist_rec_root_entity_id": HEADER_RPC_PERSIST_REC_ROOT_ENTITY_ID,
84
- "rpc_persist_rec_rec_ext_info": HEADER_RPC_PERSIST_REC_REC_EXT_INFO,
82
+ "rpc_persist_res_rec_root_entity_type": HEADER_RPC_PERSIST_RES_REC_ROOT_ENTITY_TYPE,
83
+ "rpc_persist_res_rec_root_entity_id": HEADER_RPC_PERSIST_RES_REC_ROOT_ENTITY_ID,
84
+ "rpc_persist_res_rec_ext_info": HEADER_RPC_PERSIST_RES_REC_EXT_INFO,
85
85
  }
86
86
  for attr, hk in ATTR_TO_HEADER.items():
87
87
  v = getattr(ctx, attr)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coze-coding-utils
3
- Version: 0.1.9
3
+ Version: 0.1.10
4
4
  Summary: Utilities for Coze coding client runtime context and helpers.
5
5
  Project-URL: Homepage, https://code.byted.org/stone/coze-coding-client
6
6
  Author: Bytedance Stone Team
@@ -0,0 +1,7 @@
1
+ coze_coding_utils/__init__.py,sha256=8TraCREZaR7z_RrQnGMwqZlJvLbzA-0ksCJ30gz67rQ,37
2
+ coze_coding_utils/runtime_ctx/__init__.py,sha256=4W8VliAYUP1KY2gLJ_YDy2TmcXYVm-PY7XikQD_bFwA,2
3
+ coze_coding_utils/runtime_ctx/context.py,sha256=_gS3WXsvHc4zZnyuBjrFRcrugwLtyNvr2NKVYQD-LFs,3798
4
+ coze_coding_utils-0.1.10.dist-info/METADATA,sha256=hekKWqeOLZcPNqeoMUwB_xExW7aeGVhAFYW7PpjlBr4,979
5
+ coze_coding_utils-0.1.10.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
+ coze_coding_utils-0.1.10.dist-info/licenses/LICENSE,sha256=lzckZhAjHlpSJcWvppoST095IHFpBwKiB2pKcBv7vP4,1078
7
+ coze_coding_utils-0.1.10.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- coze_coding_utils/__init__.py,sha256=FYTbHkV0j_x7xQRTwq3d1z_ClXESgWwiqhur3B7xYMo,36
2
- coze_coding_utils/runtime_ctx/__init__.py,sha256=4W8VliAYUP1KY2gLJ_YDy2TmcXYVm-PY7XikQD_bFwA,2
3
- coze_coding_utils/runtime_ctx/context.py,sha256=mRMnzcI-Yt8IYgJhOLgu0sfjKpLzOzZPVdmVEoD3K-o,3750
4
- coze_coding_utils-0.1.9.dist-info/METADATA,sha256=iXIhpxwfZqo9CdrFbdwf7dQ3vq-kO85XqrHx7Hm9mMI,978
5
- coze_coding_utils-0.1.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
- coze_coding_utils-0.1.9.dist-info/licenses/LICENSE,sha256=lzckZhAjHlpSJcWvppoST095IHFpBwKiB2pKcBv7vP4,1078
7
- coze_coding_utils-0.1.9.dist-info/RECORD,,