Skip to content

Commit

Permalink
fix stop sequence. chat screen screenshot updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dantelmomsft committed Oct 4, 2023
1 parent 54dadec commit 5e53083
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public class AnswerQuestionChatTemplate {
private static final String SYSTEM_CHAT_MESSAGE_TEMPLATE = """
You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions.
Use 'you' to refer to the individual asking the questions even if they ask with 'I'.
Answer the following question using only the data provided in the sources below.
Answer the user question using only the data provided by the user in his message.
For tabular information return it as an html table. Do not return markdown format.
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.
If you cannot answer using the sources below, say you don't know. Use below example to answer
If you cannot answer say you don't know.
%s
""" ;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ public class ChatGPTUtils {
public static ChatCompletionsOptions buildDefaultChatCompletionsOptions(List<ChatMessage> messages) {
ChatCompletionsOptions completionsOptions = new ChatCompletionsOptions(messages);

// 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
completionsOptions.setMaxTokens(1024);
completionsOptions.setTemperature(0.3);
completionsOptions.setStop(new ArrayList<>(List.of("\n")));
completionsOptions.setTemperature(0.1);
completionsOptions.setTopP(1.0);
//completionsOptions.setStop(new ArrayList<>(List.of("\n")));
completionsOptions.setLogitBias(new HashMap<>());
completionsOptions.setN(1);
completionsOptions.setStream(false);
Expand Down
Binary file modified docs/chatscreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5e53083

Please sign in to comment.