Skip to content

Commit

Permalink
id to _id
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Jan 5, 2025
1 parent 3b5eb15 commit 6f57ae5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eve/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def task_admin(
_: dict = Depends(auth.authenticate_admin)
):
result = await handle_task(request.tool, request.user_id, request.args)
return serialize_document(result.model_dump())
return serialize_document(result.model_dump(by_alias=True))


async def handle_cancel(task_id: str, user_id: str):
Expand Down
1 change: 0 additions & 1 deletion eve/tools/comfyui_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ async def async_run(self, args: Dict):
async def async_start_task(self, task: Task):
db = os.getenv("DB")
cls = modal.Cls.lookup(
# f"comfyui-{self.workspace}-{task.db}",
f"comfyui-{self.workspace}-{db}",
"ComfyUI",
environment_name="main"
Expand Down
7 changes: 6 additions & 1 deletion tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ def run_create(server_url):
}
}
response = requests.post(server_url+"/create", json=request, headers=headers)
print("GO!!!")
print(response)
print("Status Code:", response.status_code)
print(json.dumps(response.json(), indent=2))
print("done...")


def run_chat(server_url):
Expand Down Expand Up @@ -58,7 +60,7 @@ def test_client():
run_create(server_url)

print("\nRunning chat test...")
run_chat(server_url)
# run_chat(server_url)

except KeyboardInterrupt:
print("\nShutting down...")
Expand All @@ -69,3 +71,6 @@ def test_client():
server.terminate()
server.wait()


if __name__ == "__main__":
test_client()

0 comments on commit 6f57ae5

Please sign in to comment.