mirror of
https://github.com/acon96/home-llm.git
synced 2026-01-08 21:28:05 -05:00
fix issue with custom_custom_serializer
This commit is contained in:
@@ -73,6 +73,13 @@ def custom_custom_serializer(value):
|
||||
return { "type": "integer" }
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# this is throwing exceptions. I thought vol should handle this already
|
||||
if isinstance(value, vol.In):
|
||||
if isinstance(value.container, dict):
|
||||
return { "enum": list(value.container.keys()) }
|
||||
else:
|
||||
return { "enum": list(value.container) }
|
||||
|
||||
if isinstance(value, list):
|
||||
result = {}
|
||||
|
||||
Reference in New Issue
Block a user