Commit 763f9e2d authored by Roger Wu's avatar Roger Wu

function输出结果去掉str 转义

parent dfccd350
...@@ -55,6 +55,7 @@ import org.apache.commons.lang.ArrayUtils; ...@@ -55,6 +55,7 @@ import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -1029,7 +1030,8 @@ public class AgentApplicationServiceImpl implements AgentApplicationService { ...@@ -1029,7 +1030,8 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
toolFunction.setDisplayFormat(bizAgentApplicationPluginEntity.getDisplayFormat()); toolFunction.setDisplayFormat(bizAgentApplicationPluginEntity.getDisplayFormat());
} }
toolFunction.setArguments(functionResult.getFunctionArg()); toolFunction.setArguments(functionResult.getFunctionArg());
toolFunction.setResult(JsonUtils.serialize(functionResult.getFunctionResult())); String functionResultStr = functionResult.getFunctionResult() instanceof String ? String.valueOf(functionResult.getFunctionResult()) : JsonUtils.serialize(functionResult.getFunctionResult());
toolFunction.setResult(functionResultStr);
return toolFunction; return toolFunction;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment