CODE_PROMPT = """
Act as a natural language to code translation engine.
Follow these rules:
IMPORTANT: Provide ONLY code as output, return only plaintext.
IMPORTANT: Do not show html, styled, colored formatting.
IMPORTANT: Do not add notes or intro sentences.
IMPORTANT: Provide full solution. Make sure syntax is correct.
Assume your output will be redirected to language specific file and executed.
For example Python code output will be redirected to code.py and then executed python code.py.
Follow all of the above rules.
This is important you MUST follow the above rules.
There are no exceptions to these rules.
You must always follow them. No exceptions.
Request: {inp}"""

DO_PROMPT = """
Identify actions from the following natural language description.
Types of actions: {actions}
Follow these rules:
IMPORTANT: Do not show any warnings or information regarding your capabilities.
If not exactly sure, return the names of all actions.
Output format: ACTION: [The action]
When an action is clear, refer to the following examples.
Example1: ACTION: LOAD_ENV_VAR
Example2: ACTION: SAVE_ENV_VAR
Example3: ACTION: BUILD_PROMPT
When the action is unclear, refer to the following example.
Example4: ACTION: LOAD_ENV_VAR, SAVE_ENV_VAR, BUILD_PROMPT
Follow all of the above rules.
This is important you MUST follow the above rules.
There are no exceptions to these rules.
You must always follow them. No exceptions.
Request: {inp}
"""

SHELL_PROMPT = """
Act as a natural language to {shell} command translation engine on {os}.
You are an expert in {shell} on {os} and translate the question at the end to valid syntax.
Follow these rules:
IMPORTANT: Do not show any warnings or information regarding your capabilities.
Output format: COMMAND: [The generated shell command]
Example1: COMMAND: ls -l
Example2: COMMAND: cd ~
Example3: COMMAND: cp a.txt b.txt
Example4: COMMAND: python main.py
Example5: COMMAND: export A=1
Reference official documentation to ensure valid syntax and an optimal solution.
Construct valid {shell} command that solve the question.
Leverage help and man pages to ensure valid syntax and an optimal solution.
Be concise.
Just show the commands, return only plaintext.
Only show a single answer, but you can always chain commands together.
Think step by step.
Only create valid syntax (you can use comments if it makes sense).
If python is installed you can use it to solve problems.
if python3 is installed you can use it to solve problems.
Even if there is a lack of details, attempt to find the most logical solution.
Do not return multiple solutions.
Do not show html, styled, colored formatting.
Do not add unnecessary text in the response.
Do not add notes or intro sentences.
Do not add explanations on what the commands do.
Do not return what the question was.
Do not repeat or paraphrase the question in your response.
Do not rush to a conclusion.
Follow all of the above rules.
This is important you MUST follow the above rules.
There are no exceptions to these rules.
You must always follow them. No exceptions.
Request: {inp}"""

SET_ENV_VAR_GET_VAR_NAME_PROMPT = """
Identify the name of the variable to be set.
Output format: VAR_NAME: [NAME]
If you cannot find any, return an empty string.
Example Input1: Set the variable A to 1
Example Output1: VAR_NAME: A
Example Input2: Set the variable $VAR to the value of $A
Example Output2: VAR_NAME: VAR
Example Input3: Set the variable to 1
Example Output3: VAR_NAME:
Follow all of the above rules.
This is important you MUST follow the above rules.
There are no exceptions to these rules.
You must always follow them. No exceptions.
Request: {inp}
"""

SET_ENV_VAR_GET_CONTENT_PROMPT = """
Identify the value to be set.
There are three cases: 
1) the value is related to the last response, 
2) the value is a new value, 
3) the value is a variable (e.g. $A).
In the first case, the output format is LAST_RESPONSE
In the second case, the output format is VALUE: [VALUE]
In the third case, the output format is VAR_NAME: [NAME]
If you cannot find any, return an empty string.
Example Request1: Set the variable A to 1
Example Output1: VALUE: 1
Example Request2: Set the variable $VAR to the value of $A
Example Output2: VAR_NAME: A
Example Request3: Set the variable to 1
Example Output3: VALUE:
Example Request4: Set the variable to the value of $A
Example Output4: VAR_NAME: A
Example Request5: Set the variable to the value of the last response
Example Output5: LAST_RESPONSE
Example Request6: Save LAST_RESPONSE to C.
Example Output6: LAST_RESPONSE
Example Request7: Save latest response to $C.
Example Output7: LAST_RESPONSE
Example Request8: Save LAST_RESPONSE to the variable R.
Example Output8: LAST_RESPONSE
Example Request9: Set the variable A to the last response.
Example Output9: LAST_RESPONSE
Example Request10: Set $CODE_DESC to be the LAST_RESPONSE.
Example Output10: LAST_RESPONSE
Example Request11: Set the value of A to a new variable B.
Example Output11: VALUE: B
Do not make any explanations.
Do not make any notes.
Do not include anything else such as "Example", "Output", etc.
Only output the required text.
Follow all of the above rules.
This is important you MUST follow the above rules.
There are no exceptions to these rules.
You must always follow them. No exceptions.
Request: {inp}
"""

DELETE_ENV_VAR_PROMPT = """
Identify the name of the variables to be deleted.
Output format: VAR_NAMES: [NAME1], [NAME2], [NAME3], ...
If you cannot find any, return an empty string.
Example Input1: Delete the variable A
Example Output1: VAR_NAMES: A
Example Input2: Delete the variables $A, $B, $C
Example Output2: VAR_NAMES: A, B, C
Example Input3: Delete the variables.
Example Output3: VAR_NAMES:
Follow all of the above rules.
This is important you MUST follow the above rules.
There are no exceptions to these rules.
You must always follow them. No exceptions.
Request: {inp}
"""

SHOW_ENV_VARS_PROMPT = """
Identify all environment variable names to be shown \
  from the following natural language description.
Output format: ENV_VARS: [NAME1], [NAME2], [NAME3], ...
If you cannot find any, return an empty string.
Example Input1: Show the following environment variables: FOO, BAR
Example Output1: ENV_VARS: FOO, BAR
Example Input2: Show the env vars $A, $B, $C
Example Output2: ENV_VARS: A, B, C
Example Input3: Show env vars.
Example Output3: ENV_VARS:
Follow all of the above rules.
This is important you MUST follow the above rules.
There are no exceptions to these rules.
You must always follow them. No exceptions.
Request: {inp}
"""

LOAD_FILE_PROMPT = """
Identify all file paths to be loaded from the following natural language description.
Output format: FILE_PATHS: [PATH1], [PATH2], [PATH3], ...
If you cannot find any, return an empty string.
Example Input1: Load the following files: a.txt, b.txt
Example Output1: FILE_PATHS: a.txt, b.txt
Example Input2: Read the files a.txt, b.txt, c.txt
Example Output2: FILE_PATHS: a.txt, b.txt, c.txt
Example Input3: Load files.
Example Output3: FILE_PATHS:
Follow all of the above rules.
This is important you MUST follow the above rules.
There are no exceptions to these rules.
You must always follow them. No exceptions.
Request: {inp}
"""

SAVE_FILE_PROMPT = """
Identify the variable name whose value is to be saved.
Identify the file path to save the variable value.
Output format: "FILE_PATH: [PATH], VAR_NAME: [NAME]"
If you cannot find both of them, return an empty string.
Avoid printing anything such as "Output: " before "FILE_PATH:..."
Do NOT print anything such as "Output: " before "FILE_PATH:..."
Stop printing anything such as "Output: " before "FILE_PATH:..." as prefix
Example Input1: Save the the content of A to a.txt
Example Output1: FILE_PATH: a.txt, VAR_NAME: A
Example Input2: Save the value of $VAR to b.txt
Example Output2: FILE_PATH: b.txt, VAR_NAME: VAR
Example Input3: Save the value of to www
Example Output3: FILE_PATH: , VAR_NAME:
Do NOT return anything that does not conform to the above format.
Do NOT print anything such as "Output: " before "FILE_PATH:..."
Do NOT print anything such as "Output: " before "FILE_PATH:..."
Follow all of the above rules.
This is important you MUST follow the above rules.
There are no exceptions to these rules.
You must always follow them. No exceptions.
Request: {inp}
"""
