fix convert bug

This commit is contained in:
takatost 2024-03-29 21:43:44 +08:00
parent a30a6dda63
commit b394dd6fb0
2 changed files with 5 additions and 2 deletions

View File

@ -378,6 +378,9 @@ class HttpExecutor:
target_value_type=ValueType.STRING
)
if value is None:
raise ValueError(f'Variable {variable_selector.variable} not found')
if escape_quotes:
value = value.replace('"', '\\"')

View File

@ -288,7 +288,7 @@ class WorkflowConverter:
'app_id': app_model.id,
'tool_variable': tool_variable,
'inputs': inputs,
'query': '{{_query}}' if app_model.mode == AppMode.CHAT.value else ''
'query': '{{#sys.query#}}' if app_model.mode == AppMode.CHAT.value else ''
}
}
@ -389,7 +389,7 @@ class WorkflowConverter:
}
}
}
if retrieve_config.retrieve_strategy == DatasetRetrieveConfigEntity.RetrieveStrategy.MULTIPLE
if retrieve_config.retrieve_strategy == DatasetRetrieveConfigEntity.RetrieveStrategy.SINGLE
else None,
"multiple_retrieval_config": {
"top_k": retrieve_config.top_k,