[Bugfix] Remove key sorting for guided_json parameter in OpenAi compatible Server (#3945)

This commit is contained in:
Daniel E Marasco 2024-04-10 13:15:51 -04:00 committed by GitHub
parent e35397468f
commit e4c4072c94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,7 +91,7 @@ def _get_guide_and_mode(
json = request.guided_json
if isinstance(json, dict):
# turn dict into hashable string
json = json_dumps(json, sort_keys=True)
json = json_dumps(json)
elif isinstance(json, BaseModel):
# use pydantic signature so that different model classes
# with the same fields will get hashed the same