Skip to content

Commit

Permalink
fix: revert overly specific default for simple client example
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Apr 17, 2024
1 parent 0c3a29c commit b772b57
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions examples/ai_horde_client/aihorde_simple_client_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b772b57

Please sign in to comment.