File tree 3 files changed +5
-5
lines changed
app/backend/src/main/java/com/microsoft/openai/samples/rag
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ public class AnswerQuestionChatTemplate {
17
17
private static final String SYSTEM_CHAT_MESSAGE_TEMPLATE = """
18
18
You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions.
19
19
Use 'you' to refer to the individual asking the questions even if they ask with 'I'.
20
- Answer the following question using only the data provided in the sources below .
20
+ Answer the user question using only the data provided by the user in his message .
21
21
For tabular information return it as an html table. Do not return markdown format.
22
22
Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response.
23
- If you cannot answer using the sources below, say you don't know. Use below example to answer
23
+ If you cannot answer say you don't know.
24
24
%s
25
25
""" ;
26
26
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ public class ChatGPTUtils {
13
13
public static ChatCompletionsOptions buildDefaultChatCompletionsOptions (List <ChatMessage > messages ) {
14
14
ChatCompletionsOptions completionsOptions = new ChatCompletionsOptions (messages );
15
15
16
- // Due to a potential bug in using JVM 17 and java open SDK 1.0.0-beta.2, we need to provide default for all properties to avoid 404 bad Request on the server
17
16
completionsOptions .setMaxTokens (1024 );
18
- completionsOptions .setTemperature (0.3 );
19
- completionsOptions .setStop (new ArrayList <>(List .of ("\n " )));
17
+ completionsOptions .setTemperature (0.1 );
18
+ completionsOptions .setTopP (1.0 );
19
+ //completionsOptions.setStop(new ArrayList<>(List.of("\n")));
20
20
completionsOptions .setLogitBias (new HashMap <>());
21
21
completionsOptions .setN (1 );
22
22
completionsOptions .setStream (false );
You can’t perform that action at this time.
0 commit comments