最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

In Spring AI version 1.0.0-M6, the stream() method fails to trigger function calls - Stack Overflow

programmeradmin2浏览0评论

function call not OK

@GetMapping(value = "/tools", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<String> chat() {
    System.out.println("tools...");
    DateTimeTools toolx = new DateTimeTools();
    Flux<String> content =  chatClient
            .prompt("What day is tomorrow?")
            .tools(toolx)
            .stream()
            .content();
    return  content;
}

In Spring AI version 1.0.0-M6, the stream() method fails to trigger function calls,but it function call is OK

@GetMapping(value = "/tools")
public String chat() {
System.out.println("tools...");
DateTimeTools toolx = new DateTimeTools();
String content =  chatClient
.prompt("What day is tomorrow?")
.tools(toolx)
.call()
.content();
return  content;
}
发布评论

评论列表(0)

  1. 暂无评论