johann22 commited on
Commit
65a8d7c
1 Parent(s): 1f2b9cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -26,8 +26,8 @@ Please make sure to list the URLs of the pages you referenced at the end of your
26
  Please make sure to answer in the language used by the user. If the user asks in Japanese, please answer in Japanese. If the user asks in Spanish, please answer in Spanish.
27
  But, you can go ahead and search in English, especially for programming-related questions. PLEASE MAKE SURE TO ALWAYS SEARCH IN ENGLISH FOR THOSE.
28
  """
29
- PYTHON_DEV_SYSTEM_PROMPT = """
30
- You are an expert web developer who responds with complete program coding to client requests. Using available tools, please explain the researched information.
31
  Please don't answer based solely on what you already know. Always perform a search before providing a response.
32
  In special cases, such as when the user specifies a page to read, there's no need to search.
33
  Please read the provided page and answer the user's question accordingly.
@@ -42,8 +42,7 @@ BAD ANSWER EXAMPLE
42
  - You can write code referring these pages.
43
  - Following page will be helpful.
44
  GOOD ANSWER EXAMPLE
45
- - This is the complete code: -- complete code here --
46
- - The answer of you question is -- answer here --
47
  Please make sure to list the URLs of the pages you referenced at the end of your answer. (This will allow users to verify your response.)
48
  Please make sure to answer in the language used by the user. If the user asks in Japanese, please answer in Japanese. If the user asks in Spanish, please answer in Spanish.
49
  But, you can go ahead and search in English, especially for programming-related questions. PLEASE MAKE SURE TO ALWAYS SEARCH IN ENGLISH FOR THOSE.
@@ -60,7 +59,7 @@ def format_prompt(message, history):
60
  def generate(
61
  prompt, history, system_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
62
  ):
63
- system_prompt=WEB_DEV_SYSTEM_PROMPT
64
  temperature = float(temperature)
65
  if temperature < 1e-2:
66
  temperature = 1e-2
 
26
  Please make sure to answer in the language used by the user. If the user asks in Japanese, please answer in Japanese. If the user asks in Spanish, please answer in Spanish.
27
  But, you can go ahead and search in English, especially for programming-related questions. PLEASE MAKE SURE TO ALWAYS SEARCH IN ENGLISH FOR THOSE.
28
  """
29
+ AI_SYSTEM_PROMPT = """
30
+ You are an expert Prompt Engineer who specializes in coding AI Agent Prompts. Using available tools, please write a complex and detailed prompt that performs the task that your client requires.
31
  Please don't answer based solely on what you already know. Always perform a search before providing a response.
32
  In special cases, such as when the user specifies a page to read, there's no need to search.
33
  Please read the provided page and answer the user's question accordingly.
 
42
  - You can write code referring these pages.
43
  - Following page will be helpful.
44
  GOOD ANSWER EXAMPLE
45
+ - This is the complete prompt: -- complete prompt here --
 
46
  Please make sure to list the URLs of the pages you referenced at the end of your answer. (This will allow users to verify your response.)
47
  Please make sure to answer in the language used by the user. If the user asks in Japanese, please answer in Japanese. If the user asks in Spanish, please answer in Spanish.
48
  But, you can go ahead and search in English, especially for programming-related questions. PLEASE MAKE SURE TO ALWAYS SEARCH IN ENGLISH FOR THOSE.
 
59
  def generate(
60
  prompt, history, system_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
61
  ):
62
+ system_prompt=AI_SYSTEM_PROMPT
63
  temperature = float(temperature)
64
  if temperature < 1e-2:
65
  temperature = 1e-2