set a default for inputMode param
This commit is contained in:
parent
1d8f6641a2
commit
196cf5865b
@ -76,7 +76,7 @@ async def stream_code(websocket: WebSocket):
|
|||||||
valid_stack = cast(Stack, generated_code_config)
|
valid_stack = cast(Stack, generated_code_config)
|
||||||
|
|
||||||
# Validate the input mode
|
# Validate the input mode
|
||||||
input_mode = params.get("inputMode")
|
input_mode = params.get("inputMode", "image")
|
||||||
if not input_mode in get_args(InputMode):
|
if not input_mode in get_args(InputMode):
|
||||||
await throw_error(f"Invalid input mode: {input_mode}")
|
await throw_error(f"Invalid input mode: {input_mode}")
|
||||||
raise Exception(f"Invalid input mode: {input_mode}")
|
raise Exception(f"Invalid input mode: {input_mode}")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user