diff --git a/databases/wikelo_crafting.db b/databases/wikelo_crafting.db index 1c6d7bd..da628c2 100644 Binary files a/databases/wikelo_crafting.db and b/databases/wikelo_crafting.db differ diff --git a/llm_rag_knowledge/wikelo_crafting_information_part_2.json b/llm_rag_knowledge/wikelo_crafting_information_part_2.json deleted file mode 100644 index bf67878..0000000 --- a/llm_rag_knowledge/wikelo_crafting_information_part_2.json +++ /dev/null @@ -1,161 +0,0 @@ -{ - "contracts": [ - { - "name": "Armor with Horn and String", - "items_needed": [ - { "quantity": 30, "item": "Saldynium (Ore)" }, - { "quantity": 15, "item": "Carinite" }, - { "quantity": 45, "item": "Jaclium (Ore)" }, - { "quantity": 1, "item": "Carinite (Pure)" } - ], - "reward_items": [ - { "quantity": 1, "item": "Ana Armor Helmet Endro" }, - { "quantity": 1, "item": "Ana Armor Core Endro" }, - { "quantity": 1, "item": "Ana Armor Arms Endro" }, - { "quantity": 1, "item": "Ana Armor Legs Endro" }, - { "quantity": 1, "item": "Ana Armor Core Endro" }, - { "quantity": 1, "item": "Ana Armor Arms Endro" }, - { "quantity": 1, "item": "Ana Armor Legs Endro" } - ] - }, - - { - "name": "Look at desert but don't see you", - "items_needed": [ - { "quantity": 3, "item": "Wikelo Favor" }, - { "quantity": 5, "item": "Ace Interceptor Helmet" }, - { "quantity": 20, "item": "Advocacy Badge (Replica)" }, - { "quantity": 1, "item": "ADP-mk4 Core Woodland" }, - { "quantity": 1, "item": "ADP-mk4 Arms Woodland" }, - { "quantity": 1, "item": "ADP-mk4 Legs Woodland" }, - { "quantity": 1, "item": "ADP-mk4 Helmet Woodland" } - ], - "reward_items": [ - { "quantity": 1, "item": "DCP Armor Helmet Hunter Camo" }, - { "quantity": 1, "item": "DCP Armor Arms Hunter Camo" }, - { "quantity": 1, "item": "DCP Armor Core Hunter Camo" }, - { "quantity": 1, "item": "DCP Armor Legs Hunter Camo" } - ] - }, - - { - "name": "Want armor look like tree?", - "items_needed": [ - { "quantity": 3, "item": "Wikelo Favor" }, - { "quantity": 5, "item": "Ace Interceptor Helmet" }, - { "quantity": 50, "item": "Valakkar Fang (Juvenile)" }, - { "quantity": 1, "item": "ADP-mk4 Core Woodland" }, - { "quantity": 1, "item": "ADP-mk4 Arms Woodland" }, - { "quantity": 1, "item": "ADP-mk4 Legs Woodland" }, - { "quantity": 1, "item": "ADP-mk4 Helmet Woodland" } - ], - "reward_items": [ - { "quantity": 1, "item": "DCP Armor Helmet Jungle Camo" }, - { "quantity": 1, "item": "DCP Armor Arms Jungle Camo" }, - { "quantity": 1, "item": "DCP Armor Core Jungle Camo" }, - { "quantity": 1, "item": "DCP Armor Legs Jungle Camo" } - ] - }, - - { - "name": "Make space navy armor", - "items_needed": [ - { "quantity": 3, "item": "Wikelo Favor" }, - { "quantity": 5, "item": "Ace Interceptor Helmet" }, - { "quantity": 50, "item": "Grassland Quasi Grazer Egg" }, - { "quantity": 1, "item": "ADP-mk4 Core Woodland" }, - { "quantity": 1, "item": "ADP-mk4 Arms Woodland" }, - { "quantity": 1, "item": "ADP-mk4 Legs Woodland" }, - { "quantity": 1, "item": "ADP-mk4 Helmet Woodland" } - ], - "reward_items": [ - { "quantity": 1, "item": "DCP Armor Helmet Cobalt Camo" }, - { "quantity": 1, "item": "DCP Armor Arms Cobalt Camo" }, - { "quantity": 1, "item": "DCP Armor Core Cobalt Camo" }, - { "quantity": 1, "item": "DCP Armor Legs Cobalt Camo" } - ] - }, - - { - "name": "Make glowy armor", - "items_needed": [ - { "quantity": 1, "item": "Irradiated Valakkar Pearl (Grade AAA)" }, - { "quantity": 2, "item": "Irradiated Valakkar Fang (Apex)" }, - { "quantity": 15, "item": "Irradiated Valakkar Fang (Adult)" }, - { "quantity": 20, "item": "Irradiated Valakkar Fang (Juvenile)" } - ], - "reward_items": [ - { "quantity": 1, "item": "Ana Armor Helmet Endro" }, - { "quantity": 1, "item": "Ana Armor Core Endro" }, - { "quantity": 1, "item": "Ana Armor Arms Endro" }, - { "quantity": 1, "item": "Ana Armor Legs Endro" } - ] - }, - - { - "name": "Walk in danger. Look good.", - "items_needed": [ - { "quantity": 30, "item": "MG Scrip" }, - { "quantity": 1, "item": "Novikov Exploration Suit" }, - { "quantity": 1, "item": "Novikov Helmet" }, - { "quantity": 10, "item": "Irradiated Valakkar Fang (Adult)" }, - { "quantity": 20, "item": "Irradiated Valakkar Fang (Juvenile)" } - ], - "reward_items": [ - { "quantity": 1, "item": "Irradiated Valakkar Pearl (Grade AAA)" } - ] - }, - - { - "name": "Xi'an Xanthule Suit made better", - "items_needed": [ - { "quantity": 20, "item": "MG Scrip" }, - { "quantity": 1, "item": "Xanthule Suit" }, - { "quantity": 1, "item": "Xanthule Helmet" }, - { "quantity": 15, "item": "Ace Interceptor Helmet" }, - { "quantity": 1, "item": "Tevarian War Service Marker (Pristine)" } - ], - "reward_items": [] - }, - - { - "name": "Adventure a A-Venture", - "items_needed": [ - { "quantity": 30, "item": "MG Scrip" }, - { "quantity": 1, "item": "Venture Arms" }, - { "quantity": 1, "item": "Venture Core" }, - { "quantity": 1, "item": "Venture Helmet White" }, - { "quantity": 1, "item": "Venture Legs" }, - { "quantity": 10, "item": "Saldynium (Ore)" }, - { "quantity": 10, "item": "Jaclium (Ore)" }, - { "quantity": 1, "item": "Carinite (Pure)" } - ], - "reward_items": [] - }, - { - "name": "Geist \"Snow Camo\" Armor Set", - "items_needed": [ - { "quantity": 10, "item": "ASD Secure Drive" }, - { "quantity": 1, "item": "Geist Armor Arms ASD Edition" }, - { "quantity": 1, "item": "Geist Armor Core ASD Edition" }, - { "quantity": 1, "item": "Geist Armor Helmet ASD Edition" }, - { "quantity": 1, "item": "Geist Armor Legs ASD Edition" }, - { "quantity": 1, "item": "Geist Armor Backpack ASD Edition" } - ], - "reward_items": [ - { "quantity": 1, "item": "Geist \"Snow Camo\" Armor Set" } - ] - }, - - { - "name": "Zenith \"Snow Camo\" Laser Sniper Rifle", - "items_needed": [ - { "quantity": 10, "item": "ASD Secure Drive" }, - { "quantity": 1, "item": "Zenith Laser Sniper Rifle" } - ], - "reward_items": [ - { "quantity": 1, "item": "Zenith \"Snow Camo\" Laser Sniper Rifle" } - ] - } - ] -} diff --git a/llm_tools/star_citizen_info_retrieval.py b/llm_tools/star_citizen_info_retrieval.py index 1865a39..05496ef 100644 --- a/llm_tools/star_citizen_info_retrieval.py +++ b/llm_tools/star_citizen_info_retrieval.py @@ -824,7 +824,7 @@ class Tools: async def fetch_wikelo_information( self, - mission_ship_name: str, + mission_ship_or_armor_name: str, __event_emitter__: Callable[[dict], Any] = None, ): """ @@ -848,7 +848,7 @@ class Tools: try: await emitter.progress_update( - f"Searching Wikelo database for '{mission_ship_name}'" + f"Searching Wikelo database for '{mission_ship_or_armor_name}'" ) # ------------------------------------------------------------------ @@ -858,7 +858,7 @@ class Tools: cursor = conn.cursor() cursor.execute( """ - SELECT missions, ship_name, components, costs, rewards + SELECT missions, ship_name, components, costs, rewards, armor_name FROM Wikelo_information """ ) @@ -876,21 +876,22 @@ class Tools: # ------------------------------------------------------------------ search_items = [] # List of tuples: (search_string, label, full_row) for row in rows: - mission, ship_name, components, costs, rewards = row + mission, ship_name, components, costs, rewards, armor_name = row search_items.append((mission, "mission", row)) search_items.append((ship_name, "ship", row)) + search_items.append((armor_name, "armor", row)) # ------------------------------------------------------------------ # 3. Find the best fuzzy match against all searchable strings. # ------------------------------------------------------------------ best_match = process.extractOne( - mission_ship_name, + mission_ship_or_armor_name, [item[0] for item in search_items], ) if not best_match: - await emitter.error_update(f"No close match found for '{mission_ship_name}'.") - return f"No close match found for '{mission_ship_name}'." + await emitter.error_update(f"No close match found for '{mission_ship_or_armor_name}'.") + return f"No close match found for '{mission_ship_or_armor_name}'." matched_string, score = best_match @@ -910,13 +911,14 @@ class Tools: # ------------------------------------------------------------------ # 5. Build the output string. # ------------------------------------------------------------------ - mission, ship_name, components, costs, rewards = matched_row + mission, ship_name, components, costs, rewards, armor_name = matched_row result_text = ( f"**Mission:** {mission}\n" f"**Ship Name:** {ship_name}\n" f"**Components:** {components}\n" f"**Costs:** {costs}\n" - f"**Rewards:** {rewards}" + f"**Rewards:** {rewards}\n" + f"**Armor Name:** {armor_name}" ) await emitter.success_update( @@ -931,4 +933,4 @@ class Tools: if __name__ == "__main__": info_printer = Tools() - asyncio.run(info_printer.fetch_wikelo_information("Nox")) + asyncio.run(info_printer.fetch_wikelo_information("Space Navy"))