MCPcopy Create free account
hub / github.com/SpaceZephyr/myskill / create_session

Function create_session

libtv-skill/scripts/_common.py:73–84  ·  view source on GitHub ↗

创建会话或向已有会话发消息。 返回 data: { projectUuid, sessionId }。

(session_id: str = "", message: str = "")

Source from the content-addressed store, hash-verified

71
72
73def create_session(session_id: str = "", message: str = "") -> dict:
74 """
75 创建会话或向已有会话发消息。
76 返回 data: { projectUuid, sessionId }。
77 """
78 body = {}
79 if session_id:
80 body["sessionId"] = session_id
81 if message:
82 body["message"] = message
83 resp = api_post("/openapi/session", body)
84 return resp.get("data", {})
85
86
87def query_session(session_id: str, after_seq: int = 0) -> dict:

Callers 1

mainFunction · 0.90

Calls 2

api_postFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected