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
Copy file name to clipboardExpand all lines: npcsh/llm_funcs.py
+80-2Lines changed: 80 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -752,6 +752,7 @@ def check_llm_command(
752
752
4. Would this question be best answered by an alternative NPC?
753
753
5. Is it a complex request that actually requires more than one
754
754
tool to be called, perhaps in a sequence?
755
+
6. is there a need for the user to provide additional input to fulfill the request?
755
756
756
757
757
758
@@ -784,7 +785,7 @@ def check_llm_command(
784
785
prompt+=f"""
785
786
In considering how to answer this, consider:
786
787
- Whether it can be answered via a bash command on the user's computer. e.g. if a user is curious about file sizes within a directory or about processes running on their computer, these are likely best handled by a bash command.
787
-
788
+
- Whether more context from the user is required to adequately answer the question. e.g. if a user asks for a joke about their favorite city but they don't include the city , it would be helpful to ask for that information. Similarly, if a user asks to open a browser and to check the weather in a city, it would be helpful to ask for the city and which website or source to use.
788
789
- Whether a tool should be used.
789
790
790
791
Excluding time-sensitive phenomena,
@@ -799,7 +800,7 @@ def check_llm_command(
799
800
ensure the best user experience.
800
801
801
802
Respond with a JSON object containing:
802
-
- "action": one of ["execute_command", "invoke_tool", "answer_question", "pass_to_npc", "execute_sequence"]
803
+
- "action": one of ["execute_command", "invoke_tool", "answer_question", "pass_to_npc", "execute_sequence", "request_input"]
803
804
- "tool_name": : if action is "invoke_tool": the name of the tool to use.
804
805
else if action is "execute_sequence", a list of tool names to use.
805
806
- "explanation": a brief explanation of why you chose this action.
0 commit comments