File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
backend/src/main/java/ch/xxx/aidoclibchat/usecase/service Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -119,10 +119,10 @@ private ResultData createAIResult(ImageQueryDto imageDto) {
119119 imageDto = this .resizeImage (imageDto );
120120 }
121121 var prompt = new Prompt (
122- new UserMessage (this . systemPrompt , new Media (MimeType .valueOf (imageDto .getImageType ().getMediaType ()),
122+ new UserMessage (imageDto . getQuery () , new Media (MimeType .valueOf (imageDto .getImageType ().getMediaType ()),
123123 new ByteArrayResource (imageDto .getImageContent ()))));
124124
125- var response = this .chatClient .prompt (prompt ).user ( imageDto . getQuery ()). call ().chatResponse ();
125+ var response = this .chatClient .prompt (prompt ).call ().chatResponse ();
126126 var resultData = new ResultData (response .getResult ().getOutput ().getContent (), imageDto );
127127 return resultData ;
128128 }
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ public SqlRowSet searchTables(SearchDto searchDto) {
124124
125125 private String createQuery (Prompt prompt ) {
126126 var chatStart = new Date ();
127- ChatResponse response = chatClient .prompt (). user ( u -> u . text ( prompt . getContents ()) ).call ().chatResponse ();
127+ ChatResponse response = chatClient .prompt (prompt ).call ().chatResponse ();
128128 String chatResult = response .getResults ().stream ().map (myGen -> myGen .getOutput ().getContent ())
129129 .collect (Collectors .joining ("," ));
130130 LOGGER .info ("AI response time: {}ms" , new Date ().getTime () - chatStart .getTime ());
You can’t perform that action at this time.
0 commit comments