Chris Alexiuk commited on
Commit
1cad8ba
·
1 Parent(s): a7e109c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -12,12 +12,10 @@ from chainlit.playground.providers import ChatOpenAI #importing ChatOpenAI tools
12
  #openai.api_key = "YOUR_API_KEY"
13
 
14
  # ChatOpenAI Templates
15
- system_template = """
16
- You are a helpful assistant who always speaks in a pleasant tone!
17
  """
18
 
19
- user_template = """
20
- {input}
21
  Think through your response step by step.
22
  """
23
 
@@ -45,11 +43,12 @@ async def main(message: str):
45
  PromptMessage(
46
  role="system",
47
  template=system_template,
 
48
  ),
49
  PromptMessage(
50
  role="user",
51
  template=user_template,
52
- formatted=user_template.format(input=message)
53
  )
54
  ],
55
  inputs = {"input" : message},
 
12
  #openai.api_key = "YOUR_API_KEY"
13
 
14
  # ChatOpenAI Templates
15
+ system_template = """You are a helpful assistant who always speaks in a pleasant tone!
 
16
  """
17
 
18
+ user_template = """{input}
 
19
  Think through your response step by step.
20
  """
21
 
 
43
  PromptMessage(
44
  role="system",
45
  template=system_template,
46
+ formatted=system_template,
47
  ),
48
  PromptMessage(
49
  role="user",
50
  template=user_template,
51
+ formatted=user_template.format(input=message),
52
  )
53
  ],
54
  inputs = {"input" : message},