Package org.machanism.machai.mcp.server
Class HttpStreamableGenericGenaiAdapter
java.lang.Object
org.machanism.machai.ai.provider.AbstractAIProvider
org.machanism.machai.mcp.server.GenericGenaiAdapter<io.modelcontextprotocol.server.McpSyncServerExchange,io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification>
org.machanism.machai.mcp.server.HttpStreamableGenericGenaiAdapter
- All Implemented Interfaces:
Genai
public class HttpStreamableGenericGenaiAdapter
extends GenericGenaiAdapter<io.modelcontextprotocol.server.McpSyncServerExchange,io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Loggerprivate List<io.modelcontextprotocol.server.McpServerFeatures.SyncPromptSpecification> Fields inherited from class org.machanism.machai.ai.provider.AbstractAIProvider
chatModel, DEFAULT_WEBSEARCH_TYPE_NAME, instructions, LINE_SEPARATOR, LOG_LINE_LENG, LOG_SECTION_SEPARATOR, MAX_OUTPUT_TOKENS, maxOutputTokens, maxToolCalls, MCP_PROP_NAME_PREFIX, PARAGRAPH_SEPARATOR, PASSWORD_PROP_NAME, PROJECT_DIR_PARAM_NAME, projectDir, SERVERID_PROP_NAME, timeoutSec, USERNAME_PROP_NAME -
Constructor Summary
ConstructorsConstructorDescriptionHttpStreamableGenericGenaiAdapter(List<io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification> toolSpecifications, AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange> builder) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPrompt(String name, String description, ToolFunction function, Role role, ParamDescriptor... paramsDesc) private voidaddPrompt(List<io.modelcontextprotocol.spec.McpSchema.PromptMessage> promptMessageList, String text, Role role, Map<String, Object> args) List<io.modelcontextprotocol.server.McpServerFeatures.SyncPromptSpecification> Methods inherited from class org.machanism.machai.mcp.server.GenericGenaiAdapter
addTool, perform, toHumanReadableMethods inherited from class org.machanism.machai.ai.provider.AbstractAIProvider
addMcpServer, addMcpServers, addPrompts, addResource, addResources, addTools, addWebSearch, addWebSearch, clear, getConfigurator, getEnabledTools, getParamValue, getProjectDir, getTimeout, init, instructions, isErrorHandling, normalize, prompt, safelyInvokeTool, setEnabledTools, setErrorHandling, setProjectDir, setTimeout
-
Field Details
-
log
private final org.slf4j.Logger log -
prompts
-
-
Constructor Details
-
HttpStreamableGenericGenaiAdapter
HttpStreamableGenericGenaiAdapter(List<io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification> toolSpecifications, AbstractMcpServer.ToolSpecificationBuilder<io.modelcontextprotocol.server.McpSyncServerExchange> builder)
-
-
Method Details
-
addPrompt
protected void addPrompt(String name, String description, ToolFunction function, Role role, ParamDescriptor... paramsDesc) - Overrides:
addPromptin classAbstractAIProvider
-
addPrompt
-
getPrompts
- Returns:
- the prompts
-