Skip to content

Commit

Permalink
🔄 refactor(credentials): update JwtCredential to ApiCredential usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sudoskys committed Jan 5, 2025
1 parent 3cc47a0 commit f33e507
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file modified playground/augment-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions playground/augment-image.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def generate(
agent = AugmentImageInfer.build(
req_type=request_type,
image=image,
mood=Moods.Shy,
# mood=Moods.Shy,
prompt="",
defry=0,
)
Expand All @@ -45,7 +45,7 @@ async def generate(
print(f"Error: {e.message}")
return None
else:
print(f"Meta: {result.meta}")
print(f"Meta: {result.meta.endpoint}")
_res: ImageGenerateResp
file = result.files[0]
with open(f"{pathlib.Path(__file__).stem}.png", "wb") as f:
Expand Down
2 changes: 1 addition & 1 deletion playground/generate_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async def direct_use():
that's pydantic!
:return:
"""
credential = JwtCredential(jwt_token=SecretStr("pst-5555"))
credential = ApiCredential(api_token=SecretStr("pst-5555"))
result = await GenerateImageInfer(
input="1girl",
model=Model.NAI_DIFFUSION_4_CURATED_PREVIEW,
Expand Down

0 comments on commit f33e507

Please sign in to comment.