mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-09 05:27:05 +08:00
Change to api.comfy.org
This commit is contained in:
parent
79c85a9452
commit
9bf1fc71d7
2
.github/workflows/update-api-stubs.yml
vendored
2
.github/workflows/update-api-stubs.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate API models
|
- name: Generate API models
|
||||||
run: |
|
run: |
|
||||||
datamodel-codegen --use-subclass-enum --url https://stagingapi.comfy.org/openapi --output comfy_api_nodes/apis --output-model-type pydantic_v2.BaseModel
|
datamodel-codegen --use-subclass-enum --url https://api.comfy.org/openapi --output comfy_api_nodes/apis --output-model-type pydantic_v2.BaseModel
|
||||||
|
|
||||||
- name: Check for changes
|
- name: Check for changes
|
||||||
id: git-check
|
id: git-check
|
||||||
|
|||||||
@ -212,6 +212,8 @@ class ApiClient:
|
|||||||
error_message = "Unauthorized: Please login first to use this node."
|
error_message = "Unauthorized: Please login first to use this node."
|
||||||
if status_code == 402:
|
if status_code == 402:
|
||||||
error_message = "Payment Required: Please add credits to your account to use this node."
|
error_message = "Payment Required: Please add credits to your account to use this node."
|
||||||
|
if status_code == 429:
|
||||||
|
error_message = "Rate Limit Exceeded: Please try again later."
|
||||||
raise Exception(error_message)
|
raise Exception(error_message)
|
||||||
|
|
||||||
# Parse and return JSON response
|
# Parse and return JSON response
|
||||||
@ -263,7 +265,7 @@ class SynchronousOperation(Generic[T, R]):
|
|||||||
endpoint: ApiEndpoint[T, R],
|
endpoint: ApiEndpoint[T, R],
|
||||||
request: T,
|
request: T,
|
||||||
files: Optional[Dict[str, Any]] = None,
|
files: Optional[Dict[str, Any]] = None,
|
||||||
api_base: str = "https://stagingapi.comfy.org",
|
api_base: str = "https://api.comfy.org",
|
||||||
auth_token: Optional[str] = None,
|
auth_token: Optional[str] = None,
|
||||||
timeout: float = 60.0,
|
timeout: float = 60.0,
|
||||||
verify_ssl: bool = True,
|
verify_ssl: bool = True,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user