refs #731: add QA vector MCP tools
This commit is contained in:
@@ -11,7 +11,13 @@ public record McpProperties(
|
||||
String promptDescription,
|
||||
String showpromptToolName,
|
||||
String showpromptToolLabel,
|
||||
String showpromptToolDescription
|
||||
String showpromptToolDescription,
|
||||
String qaVectorSearchToolName,
|
||||
String qaVectorSearchToolLabel,
|
||||
String qaVectorSearchToolDescription,
|
||||
String qaVectorStoreToolName,
|
||||
String qaVectorStoreToolLabel,
|
||||
String qaVectorStoreToolDescription
|
||||
) {
|
||||
|
||||
private static final String DEFAULT_TOOL_NAME = "oracle.select_ai.data_text2sql";
|
||||
@@ -28,6 +34,18 @@ public record McpProperties(
|
||||
private static final String DEFAULT_SHOWPROMPT_TOOL_DESCRIPTION =
|
||||
"Select AI가 SQL 생성에 사용한 prompt를 조회하는 읽기 전용 진단 도구입니다. "
|
||||
+ "생성 SQL이나 데이터 조회 SQL은 실행하지 않습니다.";
|
||||
private static final String DEFAULT_QA_VECTOR_SEARCH_TOOL_NAME =
|
||||
"oracle.select_ai.qa_vector_search";
|
||||
private static final String DEFAULT_QA_VECTOR_SEARCH_TOOL_LABEL = "Select AI 예제 SQL 조회";
|
||||
private static final String DEFAULT_QA_VECTOR_SEARCH_TOOL_DESCRIPTION =
|
||||
"현재 질문에 사용할 유사 예제 SQL을 Select AI 실행 전에 조회합니다. "
|
||||
+ "반환값은 few-shot 컨텍스트 검토용이며 SQL을 실행하지 않습니다.";
|
||||
private static final String DEFAULT_QA_VECTOR_STORE_TOOL_NAME =
|
||||
"oracle.select_ai.qa_vector_store";
|
||||
private static final String DEFAULT_QA_VECTOR_STORE_TOOL_LABEL = "Select AI 예제 SQL 저장";
|
||||
private static final String DEFAULT_QA_VECTOR_STORE_TOOL_DESCRIPTION =
|
||||
"검토된 Select AI 결과를 후속 Text2SQL 품질 향상용 예제 SQL로 저장합니다. "
|
||||
+ "질문과 읽기 전용 답 SQL이 필요합니다.";
|
||||
|
||||
public String resolvedToolName() {
|
||||
return requiredOrDefault(toolName, DEFAULT_TOOL_NAME);
|
||||
@@ -57,6 +75,30 @@ public record McpProperties(
|
||||
return requiredOrDefault(showpromptToolDescription, DEFAULT_SHOWPROMPT_TOOL_DESCRIPTION);
|
||||
}
|
||||
|
||||
public String resolvedQaVectorSearchToolName() {
|
||||
return requiredOrDefault(qaVectorSearchToolName, DEFAULT_QA_VECTOR_SEARCH_TOOL_NAME);
|
||||
}
|
||||
|
||||
public String resolvedQaVectorSearchToolLabel() {
|
||||
return requiredOrDefault(qaVectorSearchToolLabel, DEFAULT_QA_VECTOR_SEARCH_TOOL_LABEL);
|
||||
}
|
||||
|
||||
public String resolvedQaVectorSearchToolDescription() {
|
||||
return requiredOrDefault(qaVectorSearchToolDescription, DEFAULT_QA_VECTOR_SEARCH_TOOL_DESCRIPTION);
|
||||
}
|
||||
|
||||
public String resolvedQaVectorStoreToolName() {
|
||||
return requiredOrDefault(qaVectorStoreToolName, DEFAULT_QA_VECTOR_STORE_TOOL_NAME);
|
||||
}
|
||||
|
||||
public String resolvedQaVectorStoreToolLabel() {
|
||||
return requiredOrDefault(qaVectorStoreToolLabel, DEFAULT_QA_VECTOR_STORE_TOOL_LABEL);
|
||||
}
|
||||
|
||||
public String resolvedQaVectorStoreToolDescription() {
|
||||
return requiredOrDefault(qaVectorStoreToolDescription, DEFAULT_QA_VECTOR_STORE_TOOL_DESCRIPTION);
|
||||
}
|
||||
|
||||
private String requiredOrDefault(String value, String fallback) {
|
||||
return value == null || value.isBlank() ? fallback : value.trim();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user