Commit c34a0995 authored by 赵啸非's avatar 赵啸非

修改配置文件

parent c79a71e4
......@@ -48,9 +48,9 @@
<profiles.datasource.password>12345678</profiles.datasource.password>
<profiles.publish.path>E:\pic\publish\</profiles.publish.path>
<profiles.filepath>E:/mortals/app/data</profiles.filepath>
<profiles.chat.streamChatUrl>http://chat.scsmile.cn/api/v1/chat/completions</profiles.chat.streamChatUrl>
<profiles.chat.streamChatUrl>https://agent.wx3.com.cn:443/v1/chat-messages</profiles.chat.streamChatUrl>
<profiles.chat.auth-head>Authorization</profiles.chat.auth-head>
<profiles.chat.auth-value>Bearer fastgpt-jZqZqjWQOic82RbTFdzAu94ddX0YL0ZWfBUtYAcVtewIkXe0yUfH</profiles.chat.auth-value>
<profiles.chat.auth-value>Bearer app-ritPdgkz8bsrfzpcJdSTkUF5</profiles.chat.auth-value>
</properties>
</profile>
<profile>
......
......@@ -35,7 +35,9 @@ public abstract class AbstractFlowChatTemplate implements IFlowChat, FlowChatCal
@PostConstruct
private void init() {
webClient = WebClient.builder()
webClient = WebClient
.builder()
.baseUrl("https://agent.wx3.com.cn")
.defaultHeader(HttpHeaders.CONTENT_TYPE, "application/json").build();
}
......@@ -109,8 +111,9 @@ public abstract class AbstractFlowChatTemplate implements IFlowChat, FlowChatCal
*/
private Flux<String> doRequest(FlowChatContext context, FLowChatRequest request, HttpHeaders headers) {
log.info("请求大模型开始,URL:{}, 参数:{}", request.getUrl(), request.getJsonBody());
Flux<String> flux = webClient.post()
.uri(request.getUrl())
Flux<String> flux = webClient
.post()
.uri("/v1/chat-messages")
.accept(MediaType.TEXT_EVENT_STREAM)
.headers(httpHeaders -> httpHeaders.addAll(headers))
.bodyValue(request.getJsonBody())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment