You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* ItemHandlingResult class
* enrich command
* customize openai response_format
* quest and lore notes
* add_event command
* not reading existing items when loading
* add test for add_event and some fixes
* change back to kobold backend by default
PRE_PROMPT: 'Below is an instruction that describes a task, paired with an input that provides further context. As an game keeper for an RPG, write a response that appropriately completes the request.'
13
13
BASE_PROMPT: "[Story context: {story_context}]; [History: {history}]; [USER_START] Rewrite [{input_text}] in your own words using the supplied Context and History to create a background for your text. Use about {max_words} words."
OPENAI_BODY: '{"model":"gpt-3.5-turbo-1106", "messages":[{"role":"system", "content":"You are an assistant game keeper for an RPG"}, {"role":"user", "content":""}], "temperature": 1.0, "max_tokens":500}'
24
24
OPENAI_API_KEY: "OPENAI_API_KEY"
25
+
OPENAI_JSON_FORMAT: '{"type":"json_object"}'
25
26
ITEMS_PROMPT: "Add {items} of various type."
26
27
SPAWN_PROMPT: "Add a level {level}, {alignment} npc or mob."
27
-
IDLE_ACTION_PROMPT: "[Sentiments towards characters: {sentiments}]; [History: {history}]; [Last action: {last_action}]; [Location: {location}]; [Acting character: {character}]; [USER_START] Choose an item from: {items}, or a character from:{characters}, to interact with, or perform a solo action. Do not make up new characters. Don't contradict or repeat Last Action. [USER_START] Don't write what {character_name} thinks, or what the player (You) or anyone else does. Write what {character_name} does, in present tense third person point of view. Use less than 40 words. "
28
+
IDLE_ACTION_PROMPT: "Sentiments towards characters: {sentiments}; History: {history}; Location: {location}; Acting character: {character}; [USER_START] Choose an item from: {items}, or a character from:{characters}, to interact with, or perform a solo action. Do not make up new characters. The action should be a continuation of History, or a new one, but should not repeat or be similar. [USER_START] Don't write what {character_name} thinks, or what the player (You) or anyone else does. Write what {character_name} does, in present tense third person point of view. Use less than 40 words. "
28
29
TRAVEL_PROMPT: "[USER_START] For {character}: pick a location from [{locations}] they would like to travel to or a direction from [{directions}], or stay in the current location. Do not make up new locations. Write what {character_name} chooses. [USER_START] Write only the location name, direction, or write nothing to stay in the same location. Write nothing else."
29
-
REACTION_PROMPT: "[Story context: {story_context}]; [History: {history}]; [USER_START] Act as {character}. {acting_character_name} has performed the following action that involves {character_name}: {action}. {character_name}'s sentiment towards {acting_character_name}: {sentiment}. [USER_START] Respond with a suitable action for {character_name}, in present tense third person point of view. Use less than 40 words."
30
+
REACTION_PROMPT: "Story context: {story_context}; History: {history}; [USER_START] Act as {character}. {acting_character_name} has performed the following action that involves {character_name}: {action}. {character_name}'s sentiment towards {acting_character_name}: {sentiment}. [USER_START] Respond with a suitable action for {character_name}, in present tense third person point of view. Use less than 40 words."
30
31
STORY_BACKGROUND_PROMPT: "[USER_START] For an RPG described as {story_type} set in a world described as {world_mood}, {world_info}, write a captivating background story that the player can interact with. Include a large scale plot conflict that the player will encounter. Use less than 400 words."
31
32
START_LOCATION_PROMPT: '[Story context: {story_context}]; Zone info: {zone_info}; Item json example: {{"name":"", "type":"", "short_descr":"10 words"}}, type can be "Weapon", "Wearable", "Other" or "Money"; Npc example: {{"name":"", "sentiment":"", "race":"", "gender":"m, f, or n", "level":(int), "description":"25 words"}} ; Exit json example: {{"direction":"", "name":"name of new location", "short_descr":"exit description"}}; [USER_START] For a {story_type}, come up with a name for the location with this description: {location_description}. {items_prompt} {spawn_prompt} Add a brief description, and one to three additional exits leading to new locations. Fill in this JSON template and do not write anything else: {{"name": "", "exits":[], "items":[], "npcs":[]}}.'
32
33
STORY_PLOT_PROMPT: "[USER_START] For an RPG described as {story_type} set in a world described as {world_mood}, {world_info}. Based on the following background: {story_background} write an innovative and engaging plot that the player can become part of. Use less than 400 words."
@@ -36,12 +37,7 @@ GOAL_PROMPT: '[Characters:{characters}][Sentiments towards characters: {sentimen
PLAYER_ENTER_PROMPT: 'Story context: {story_context}; World info: {world_info}; Zone info: {zone_info}; Npc example: {{"name":"", "sentiment":"", "race":"", "gender":"m, f, or n", "level":(int), "description":"25 words", "memories":"25 words"}}. [USER_START] The player has just re-entered this location: {location_info}. Consider whether any items, npcs or mobs should be spawned. For mobs, only enter the name of race. Fill in this JSON template and do not write anything else: {{"items":[], "npcs":[] "mobs":[]}}.'
38
39
QUEST_PROMPT: '[Story context: {story_context}]; World info: {world_info}; Zone info: {zone_info}; Character: {character_card}; [USER_START] In an RPG described as {story_type}, {character_name} needs someone to perform a task. Based on the following input, come up with a suitable reason for it, using {character_name}s personality and history. Task info: {base_quest}. Fill in this JSON template and do not write anything else: {{"reason":""}} \n\n '
39
-
MAKE_DECISION: '[Sentiments towards characters: {sentiments}]; [History: {history}]; [Location: {location}]; [USER_START] Pick one of the following options that is in line with {character} and perform that action: {types}. Write your motivation for the action, in this JSON format: {{"type":"", "why":"", "where": "", "target":""}} to receive more context.'
40
-
FOLLOW_PROMPT: '[USER_START] Play as {character}: Pick a character from [{characters}] they would like to follow, or stay in the current location. Do not make up new characters. Fill in the following JSON template: {{"action":"follow", "character":"", "dialogue":""}}.'
41
-
GIVE_PROMPT: '[USER_START] Play as {character}: Pick an item from [{items}] they would like to give to another character among: [{characters}]. Do not make up new characters or items. Use "dialogue" if you want to say something. Fill in the following JSON template: {{"action":"give", "item_name":"", "character_name":"", "dialogue":""}}.'
42
-
TAKE_PROMPT: '[USER_START] Play as {character}: Pick an item from [{items}] they would like to take from another character. Do not make up new characters or items. Use "dialogue" if you want to say something. Fill in the following JSON template: {{"action":"take", "item_name":"", "character_name":"", "dialogue":""}}.'
43
-
WEAR_PROMPT: '[USER_START] Play as {character}: Pick an item from [{items}] they would like to {wear_or_unwear}. Do not make up new items. Use "dialogue" if you want to say something. Fill in the following JSON template: {{"action":"{wear_or_unwear}", "item_name":"", "dialogue":""}}.'
44
-
ATTACK_PROMPT: '[USER_START] Play as {character}: Select someone or something to attack from [creatures]. Do not make up new creatures. Use "dialogue" if you want to say something. Fill in the following JSON template: {{"action":"attack", "creature_name":"", "dialogue":""}}'
45
-
NOTE_QUEST_PROMPT: '[Story context: {story_context}]; World info: {world_info}; Zone info: {zone_info};In an RPG described as {story_type}, generate a quest that starts from reading a note. Fill in the following JSON template: {{"type":"find/talk", "target":"what to find, who to talk to", "location":"", "reward":""}}'
40
+
NOTE_QUEST_PROMPT: '[Story context: {story_context}]; World info: {world_info}; Zone info: {zone_info}; For an RPG described as {story_type}, generate a quest that starts from reading a note. The reader must find and talk to a person. Fill in the following JSON template and write nothing else.: {{"reason": "only what the note says. 50 words.", "type":"talk", "target":"who to talk to", "location":"", "name":"name of quest"}}'
41
+
NOTE_LORE_PROMPT: '[Story context: {story_context}]; World info: {world_info}; Zone info: {zone_info}; For an RPG described as {story_type}, Decide what is written on a note that has been found. Use the provided story and world information to generate a piece of lore. Use about 50 words.'
"context": "The player is having tea in the Mad Hatter's house, as Alice. The guests are all mad in their own way, and making sense of anything is difficult.",
27
-
"story_type": "A whimsical and humoristic tale of tea and madness. Guests are so busy with their own problems that it's difficult to make yourself heard.",
27
+
"type": "A whimsical and humoristic tale of tea and madness. Guests are so busy with their own problems that it's difficult to make yourself heard.",
0 commit comments