Skip to content

Commit

Permalink
feat: ai server response String 클래스로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Youthhing committed Sep 6, 2024
1 parent c20203c commit 83b981d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.client.WebClient;
import team.flight.backend.service.dto.AiSendRequest;
import team.flight.backend.service.dto.AiSendResponse;

@Component
@RequiredArgsConstructor
public class WebClientSender {

private final WebClient webClient;

public AiSendResponse sendFirstRequest(String request) {
public String sendFirstRequest(String request) {
return webClient.post()
.uri("/api/submit")
.uri("/api/ppt")
.bodyValue(AiSendRequest.from(request))
.retrieve()
.bodyToMono(AiSendResponse.class)
.bodyToMono(String.class)
.block();
}
}

0 comments on commit 83b981d

Please sign in to comment.