Fix: ObjectNode 직렬화 시 getter 속성 노출 오류 수정
This commit is contained in:
@@ -20,6 +20,11 @@ public class GuardrailService {
|
|||||||
* ToolMetadata에 정의된 required/allowed arguments 기준으로 요청 인자를 검증합니다.
|
* ToolMetadata에 정의된 required/allowed arguments 기준으로 요청 인자를 검증합니다.
|
||||||
*/
|
*/
|
||||||
public void validate(ToolMetadata metadata, ObjectNode arguments) {
|
public void validate(ToolMetadata metadata, ObjectNode arguments) {
|
||||||
|
if (metadata.getParametersSchema() == null) {
|
||||||
|
// 스키마 정보가 없으면(Fallback 툴 등) 검증을 생략합니다.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Iterator<String> fieldNames = arguments.fieldNames();
|
Iterator<String> fieldNames = arguments.fieldNames();
|
||||||
while (fieldNames.hasNext()) {
|
while (fieldNames.hasNext()) {
|
||||||
String fieldName = fieldNames.next();
|
String fieldName = fieldNames.next();
|
||||||
|
|||||||
@@ -121,6 +121,11 @@ public class ExecuteService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Object result = executeWithResilience(context, metadata, argumentsNode, payload);
|
Object result = executeWithResilience(context, metadata, argumentsNode, payload);
|
||||||
|
|
||||||
|
if (result instanceof com.fasterxml.jackson.databind.JsonNode) {
|
||||||
|
result = objectMapper.convertValue(result, Object.class);
|
||||||
|
}
|
||||||
|
|
||||||
long elapsedMillis = elapsedMillis(startedAt);
|
long elapsedMillis = elapsedMillis(startedAt);
|
||||||
|
|
||||||
String responseText = "";
|
String responseText = "";
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ public class ToolPlanner {
|
|||||||
|
|
||||||
toolMetadata = ToolMetadata.builder()
|
toolMetadata = ToolMetadata.builder()
|
||||||
.uid(toolName)
|
.uid(toolName)
|
||||||
|
.name(toolName)
|
||||||
.integrationType("DIRECT")
|
.integrationType("DIRECT")
|
||||||
.podUrl(fallbackPodUrl)
|
.podUrl(fallbackPodUrl)
|
||||||
.build();
|
.build();
|
||||||
|
|||||||
Reference in New Issue
Block a user