Skip to content

Commit

Permalink
remove convert
Browse files Browse the repository at this point in the history
  • Loading branch information
lhpqaq committed Jan 2, 2025
1 parent 86b2522 commit db34fb5
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import org.apache.bigtop.manager.ai.assistant.config.GeneralAssistantConfig;
import org.apache.bigtop.manager.ai.assistant.provider.ChatMemoryStoreProvider;
import org.apache.bigtop.manager.ai.assistant.provider.LocSystemPromptProvider;
import org.apache.bigtop.manager.ai.core.AbstractAIAssistantFactory;
import org.apache.bigtop.manager.ai.core.config.AIAssistantConfig;
import org.apache.bigtop.manager.ai.core.enums.PlatformType;
Expand Down Expand Up @@ -50,15 +49,14 @@ public class GeneralAssistantFactory extends AbstractAIAssistantFactory {
private ChatMemoryStoreProvider chatMemoryStoreProvider;

private void configureSystemPrompt(AIAssistant.Builder builder, SystemPrompt systemPrompt, String locale) {
LocSystemPromptProvider locSystemPromptProvider = (LocSystemPromptProvider) systemPromptProvider;
List<String> systemPrompts = new ArrayList<>();
if (systemPrompt != null) {
systemPrompts.add(locSystemPromptProvider.getSystemMessage(systemPrompt));
systemPrompts.add(systemPromptProvider.getSystemMessage(systemPrompt));
}
if (locale != null) {
systemPrompts.add(locSystemPromptProvider.getLanguagePrompt(locale));
systemPrompts.add(systemPromptProvider.getLanguagePrompt(locale));
}
builder.withSystemPrompt(locSystemPromptProvider.getSystemMessages(systemPrompts));
builder.withSystemPrompt(systemPromptProvider.getSystemMessages(systemPrompts));
}

private AIAssistant.Builder initializeBuilder(PlatformType platformType) {
Expand Down

0 comments on commit db34fb5

Please sign in to comment.