ci: add tests for text input/output components (#3649)
* ci: add tests for text input/output components * ci: add tests for text input/output components * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
3eaad7bc3a
commit
9368aef91e
3 changed files with 50 additions and 2 deletions
|
|
@ -136,7 +136,11 @@ class ComponentInputHandle:
|
|||
|
||||
|
||||
async def run_single_component(
|
||||
clazz: type, inputs: dict = None, run_input: Optional[Any] = None, session_id: Optional[str] = None
|
||||
clazz: type,
|
||||
inputs: dict = None,
|
||||
run_input: Optional[Any] = None,
|
||||
session_id: Optional[str] = None,
|
||||
input_type: Optional[str] = "chat",
|
||||
) -> dict[str, Any]:
|
||||
user_id = str(uuid.uuid4())
|
||||
flow_id = str(uuid.uuid4())
|
||||
|
|
@ -162,7 +166,7 @@ async def run_single_component(
|
|||
component_id = _add_component(clazz, inputs)
|
||||
graph.prepare()
|
||||
if run_input:
|
||||
graph_run_inputs = [InputValueRequest(input_value=run_input, type="chat")]
|
||||
graph_run_inputs = [InputValueRequest(input_value=run_input, type=input_type)]
|
||||
else:
|
||||
graph_run_inputs = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue