Commit 3229e774 by Jonathan Thomas

Removing more stuff which breaks in 1.19.1

parent 0f100790
Pipeline #12214 failed with stage
in 12 seconds
...@@ -4,7 +4,6 @@ import com.google.gson.Gson; ...@@ -4,7 +4,6 @@ import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.owlmaddie.controls.SpeedControls; import com.owlmaddie.controls.SpeedControls;
import com.owlmaddie.goals.*; import com.owlmaddie.goals.*;
import com.owlmaddie.items.RarityItemCollector;
import com.owlmaddie.json.QuestJson; import com.owlmaddie.json.QuestJson;
import com.owlmaddie.message.Behavior; import com.owlmaddie.message.Behavior;
import com.owlmaddie.message.MessageParser; import com.owlmaddie.message.MessageParser;
...@@ -444,39 +443,6 @@ public class ChatDataManager { ...@@ -444,39 +443,6 @@ public class ChatDataManager {
} }
} }
// Generate quest data for this server session
public void generateQuest() {
// Get items needed for Quest prompt
List<String> commonItems = RarityItemCollector.getItemsByRarity(Rarity.COMMON, 5);
List<String> uncommonItems = RarityItemCollector.getItemsByRarity(Rarity.UNCOMMON, 5);
List<String> rareItems = RarityItemCollector.getItemsByRarity(Rarity.RARE, 5);
// Get entities needed for Quest prompt
List<String> commonEntities = RarityItemCollector.getEntitiesByRarity(Rarity.COMMON, 5);
List<String> uncommonEntities = RarityItemCollector.getEntitiesByRarity(Rarity.UNCOMMON, 5);
List<String> rareEntities = RarityItemCollector.getEntitiesByRarity(Rarity.RARE, 5);
// Add context information for prompt
Map<String, String> contextData = new HashMap<>();
contextData.put("items_common", String.join("\n", commonItems));
contextData.put("items_uncommon", String.join("\n", uncommonItems));
contextData.put("items_rare", String.join("\n", rareItems));
contextData.put("entities_common", String.join("\n", commonEntities));
contextData.put("entities_uncommon", String.join("\n", uncommonEntities));
contextData.put("entities_rare", String.join("\n", rareEntities));
// Add message
List<ChatMessage> messages = new ArrayList<>();
messages.add(new ChatMessage("Generate me a new fantasy story with ONLY the 1st character in the story", ChatSender.USER));
// Generate Quest: fetch HTTP response from ChatGPT
ChatGPTRequest.fetchMessageFromChatGPT("system-quest", contextData, messages, true).thenAccept(output_message -> {
// New Quest
Gson gson = new Gson();
quest = gson.fromJson(output_message, QuestJson.class);
});
}
// Save chat data to file // Save chat data to file
public String GetLightChatData() { public String GetLightChatData() {
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment