From b772b57cf4f440bfd24f9d47f15af744cd806a04 Mon Sep 17 00:00:00 2001 From: tazlin Date: Wed, 17 Apr 2024 19:20:13 -0400 Subject: [PATCH] fix: revert overly specific default for simple client example --- .../aihorde_simple_client_example.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/examples/ai_horde_client/aihorde_simple_client_example.py b/examples/ai_horde_client/aihorde_simple_client_example.py index 905ee41..a95be2d 100644 --- a/examples/ai_horde_client/aihorde_simple_client_example.py +++ b/examples/ai_horde_client/aihorde_simple_client_example.py @@ -6,7 +6,16 @@ from horde_sdk import ANON_API_KEY from horde_sdk.ai_horde_api import KNOWN_SAMPLERS from horde_sdk.ai_horde_api.ai_horde_clients import AIHordeAPISimpleClient -from horde_sdk.ai_horde_api.apimodels import ImageGenerateAsyncRequest, ImageGenerationInputPayload, LorasPayloadEntry + +# isort: off +from horde_sdk.ai_horde_api.apimodels import ( + ImageGenerateAsyncRequest, + ImageGenerationInputPayload, + LorasPayloadEntry, + # TIPayloadEntry, +) + +# isort: on def simple_generate_example(api_key: str = ANON_API_KEY) -> None: @@ -15,7 +24,6 @@ def simple_generate_example(api_key: str = ANON_API_KEY) -> None: status_response, job_id = simple_client.image_generate_request( ImageGenerateAsyncRequest( apikey=api_key, - workers=["facf2d67-9e83-4a9e-a7ae-8e555d55af08"], params=ImageGenerationInputPayload( sampler_name=KNOWN_SAMPLERS.k_euler, cfg_scale=4, @@ -63,7 +71,7 @@ def simple_generate_example(api_key: str = ANON_API_KEY) -> None: # Use arg parser to get the API key argParser = argparse.ArgumentParser() - argParser.add_argument("-k", "--api-key", required=False, default=ANON_API_KEY, help="Your horde API key.") + argParser.add_argument("-k", "--apikey", required=False, default=ANON_API_KEY, help="Your horde API key.") args = argParser.parse_args() api_key = args.api_key