Skip to content

Commit

Permalink
rephrase javadoc
Browse files Browse the repository at this point in the history
Signed-off-by: Mingshi Liu <[email protected]>
  • Loading branch information
mingshl committed Aug 13, 2024
1 parent 8b55f31 commit eca844b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,11 @@ public SearchResponse processResponse(SearchRequest request, SearchResponse resp
/**
* Processes the search response asynchronously by rewriting the documents with the inference results.
*
* At default, process many document in one prediction through rewriteResponseDocuments method.
* but when process inference one document for one inference,
* separate one N-hits searchResponse into N one-hit search response,
* execute the same rewriteResponseDocument method,
* after N one-hit search response with inference result gets back,
* combined N one-hit search response back into one N-hits searchResponse.
* By default, it processes multiple documents in a single prediction through the rewriteResponseDocuments method.
* However, when processing one document per inference, it separates the N-hits search response into N one-hit search responses,
* executes the same rewriteResponseDocument method for each one-hit search response,
* and after receiving N one-hit search responses with inference results,
* it combines them back into a single N-hits search response.
*
* @param request the search request
* @param response the search response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,6 @@ public void testProcessResponseException() throws Exception {
}
}

// public void testPrint(){
// String payload = "{\"prompt\":\"\\n\\nHuman: You are a professional data analysist. You will always answer question based on the
// given context first. If the answer is not directly shown in the context, you will analyze the data and find the answer. If you do not
// know the answer, just say I do not know. Context:[\"Dr. Eric Goldberg is a fantastic doctor who has correctly diagnosed every issue
// that my wife and I have had. Unlike many of my past doctors, Dr. Goldberg is very accessible and we have been able to schedule
// appointments with him and his staff very quickly. We are happy to have him in the neighborhood and look forward to being his patients
// for many years to come.\",\"happy visit\"]. Please answer this question: \"please summerize the documents\"
// \\n\\nAssistant:\",\"max_tokens_to_sample\":300,\"temperature\":0.5,\"top_k\":250,\"top_p\":1,\"stop_sequences\":[\"\\\\n\\\\nHuman:\"]}";
// System.out.println(payload);
// }

/**
* Tests the successful processing of a response with a single pair of input and output mappings.
*
Expand Down

0 comments on commit eca844b

Please sign in to comment.