Skip to content

Commit 0b700d2

Browse files
authored
fix(chat-api): fix some bugs. (#24)
1 parent 5572a4d commit 0b700d2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

libs/api/hiagent_api/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ def __init__(
475475
def set_app_base_url(self, base_url: str):
476476
self.base_url = base_url
477477

478-
async def _apost(self, app_key: str, action: str, params: dict, _headers: Optional[dict]) -> str:
478+
async def _apost(self, app_key: str, action: str, params: dict, _headers: Optional[dict] = None) -> str:
479479
if self.base_url == "":
480480
raise Exception(
481481
"base_url not set, you should call set_app_base_url() first"
@@ -498,7 +498,7 @@ async def _apost(self, app_key: str, action: str, params: dict, _headers: Option
498498
raise Exception("empty response")
499499
return res_text
500500

501-
def _post(self, app_key: str, action: str, params: dict, _headers: Optional[dict]) -> str:
501+
def _post(self, app_key: str, action: str, params: dict, _headers: Optional[dict] = None) -> str:
502502
if self.base_url == "":
503503
raise Exception(
504504
"base_url not set, you should call set_app_base_url() first"

libs/api/hiagent_api/chat_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ class SyncRunAppWorkflowResponse(BaseSchema):
12211221
description="status",
12221222
validation_alias="status",
12231223
)
1224-
nodes: dict[str: WorkflowNode] = Field(
1224+
nodes: dict[str, WorkflowNode] = Field(
12251225
description="nodes",
12261226
validation_alias="nodes",
12271227
)

libs/api/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies = [
1010
"httpx-sse>=0.4.0",
1111
"aiofiles>=23.1.0",
1212
"pydantic>=2.11.5",
13+
"StrEnum>=0.4.15",
1314
"python-dotenv>=1.1.0"
1415
]
1516

0 commit comments

Comments
 (0)