SegmentFault 宣言

为了消除开发领域的知识不平等,我们建立了开放式协作的问答社区。欢迎你加入贡献自己的智慧。

最新评论
头像

simon:开始可以建立连接,但是超时后报d.l.m.c.transport.http.SseEventListener : SSE channel failure
java.net.SocketTimeoutException: Read timed out
这个错误

头像

simon:在使用过程中 报 d.l.m.c.transport.http.SseEventListener : SSE channel failure
java.net.SocketTimeoutException: Read timed out 这个错误

@Bean(name = "mcpToolProvider")

@Scope("prototype")
public ToolProvider mcpToolProvider() {
    McpTransport transport = new HttpMcpTransport.Builder()
            .sseUrl(sseUrl)
            .logRequests(Boolean.parseBoolean(isLogRequests))
            .logResponses(Boolean.parseBoolean(isLogResponses))
            .timeout(Duration.ofSeconds(timeout * 2))
            .build();

    McpClient mcpClient = new DefaultMcpClient.Builder()
            .transport(transport)
            .toolExecutionTimeout(Duration.ofSeconds(timeout))
            .resourcesTimeout(Duration.ofSeconds(timeout))
            .promptsTimeout(Duration.ofSeconds(timeout))
            .pingTimeout(Duration.ofSeconds(timeout / 2))
            .build();

    List<ToolSpecification> toolSpecifications = mcpClient.listTools();
    logger.info("toolSpecifications={}", toolSpecifications);

    McpToolProvider mcpToolProvider = McpToolProvider.builder()
            .mcpClients(List.of(mcpClient))
            .build();

    return mcpToolProvider;
} 这个是关键代码
头像

站在远方望童年:引入text_layer_builder.css里的内容就可以对齐了

头像

猫头虎:爱派(AiPy)产品社群入口:

爱派(AiPy)官网入口:

头像

认真的咖啡:👍👍👍

头像

随风起落:老师,今天重装了2次了,又都卡在gaussdb-0 ,ready状态 0/1上,status:running。能不能加我个微信 sfql0516,翘首以盼。

勋章奖励
更多