Skip to content

Commit

Permalink
Potential Fix for Model not Switching
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeyoYT committed Sep 15, 2024
1 parent df4295e commit 23a71c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/me/ailama/commands/WebCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public void handleCommand(SlashCommandInteractionEvent event) {
if(improveQuery) {
queryOption = OllamaManager.getInstance().createAssistantX(null).systemMessageProvider(o -> """
You are a helpful assistant! you will be given a query, you need to improve it for getting better search results, your
response should only contain the improved query in plain text and should not contain any other information.
response should only contain the improved query in plain text and should not contain any other information. You may take last
conversation into account while improving the query. If you are unable to improve the query, you can respond with the same query.
""").build().answer(queryOption);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ public void setModel(String model, String userId) {
}

assistants.remove(userId);
createAssistant(model, userId);
assistants.put(userId, createAssistant(model, userId));
}

public boolean hasModel(String model) {
Expand Down

0 comments on commit 23a71c6

Please sign in to comment.