Skip to content

Commit 0518ff2

Browse files
committed
fix missing params
1 parent 9bdb938 commit 0518ff2

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

tale/driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ def prepare_combat_prompt(self,
909909
defender_titles.append(defender_title)
910910

911911

912-
return llm_config['COMBAT_PROMPT'].format(attackers=attacker_names,
912+
return llm_config.params['COMBAT_PROMPT'].format(attackers=attacker_names,
913913
defenders=defender_titles,
914914
location=location_title,
915915
input_text=combat_result,

tale/llm/llm_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def free_form_action(self, location: Location, character_name: str, character_c
286286
character_card=character_card,
287287
event_history=event_history,
288288
location=location,
289-
actions=self.action_list)
289+
actions=llm_config.params['ACTION_LIST'])
290290
return self._character.free_form_action(action_context)
291291

292292
def request_follow(self, actor: MudObject, character_name: str, character_card: str, event_history: str, location: Location, asker_reason: str):

tale/llm/quest_building.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, backend: str, io_util: IoUtil, default_body: dict, json_gramm
2020

2121
def generate_quest(self, base_quest: dict, character_name: str, location: Location, context: WorldGenerationContext, character_card: str = '', story_type: str = '', world_info: str = '', zone_info: str = '') -> Quest:
2222
prompt = self.pre_prompt
23-
prompt += self.llm_config.params['QUEST_PROMPT'].format(
23+
prompt += llm_config.params['QUEST_PROMPT'].format(
2424
context='{context}',
2525
base_quest=base_quest,
2626
location_name=location.name,
@@ -33,7 +33,7 @@ def generate_quest(self, base_quest: dict, character_name: str, location: Locati
3333

3434
def generate_note_quest(self, context: WorldGenerationContext, zone_info: str) -> Quest:
3535
prompt = self.pre_prompt
36-
prompt += self.llm_config.params['NOTE_QUEST_PROMPT'].format(
36+
prompt += llm_config.params['NOTE_QUEST_PROMPT'].format(
3737
context='{context}',
3838
zone_info=zone_info)
3939
request_body = deepcopy(self.default_body)

tale/llm/world_building.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def build_location(self, location: Location,
6464
if item_amount > 0:
6565
items_prompt = llm_config.params['ITEMS_PROMPT'].format(items=item_amount)
6666

67-
prompt = self.pre_json_prompt
67+
prompt = llm_config.params['PRE_JSON_PROMPT']
6868
prompt += llm_config.params['CREATE_LOCATION_PROMPT'].format(
6969
context = '{context}',
7070
zone_info=zone_info,

tests/test_living_npc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def test_character_card(self):
7474
assert(json_card['name'] == 'test')
7575
assert('ale' in json_card['items'])
7676
assert('knife' in json_card['items'])
77+
assert('goal' in json_card.keys())
7778
assert(eval(json_card['wielding']) == knife.to_dict())
7879

7980
npc.wielding = None

0 commit comments

Comments
 (0)