Skip to content

Commit

Permalink
Merge pull request #91 from Haidra-Org/main
Browse files Browse the repository at this point in the history
fix: don't crash when extra/new fields are returned due to api changes
  • Loading branch information
tazlin authored Dec 12, 2023
2 parents 6fd9497 + 8e3258e commit ad3a5a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion horde_sdk/ai_horde_api/apimodels/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ImageGenerateParamMixin(BaseModel):
v2 API Model: `ModelPayloadStable`
"""

model_config = ConfigDict(frozen=True, extra="forbid")
model_config = ConfigDict(frozen=True) # , extra="forbid")

sampler_name: KNOWN_SAMPLERS = KNOWN_SAMPLERS.k_lms
"""The sampler to use for this generation. Defaults to `KNOWN_SAMPLERS.k_lms`."""
Expand Down
2 changes: 1 addition & 1 deletion horde_sdk/generic_api/apimodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class HordeResponse(HordeAPIMessage):


class HordeResponseBaseModel(HordeResponse, BaseModel):
model_config = ConfigDict(frozen=True, extra="forbid")
model_config = ConfigDict(frozen=True) # , extra="forbid")


class ResponseRequiringFollowUpMixin(abc.ABC):
Expand Down

0 comments on commit ad3a5a3

Please sign in to comment.