sguertl commited on
Commit
899118d
·
verified ·
1 Parent(s): afd48fc

Use str instead of Prompt as parameter

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,12 +15,12 @@ class Prompt(BaseModel):
15
  message: str
16
 
17
  @app.post("/chat")
18
- async def chat(prompt: Prompt):
19
  system_prompt = (
20
  "You are a beginner programming student helping a peer. "
21
  "Offer hints, ask questions, and support understanding—don’t give full solutions."
22
  )
23
- full_prompt = f"<s>[INST] <<SYS>>{system_prompt}<</SYS>>\n{prompt.message} [/INST]"
24
 
25
  output = client.text_generation(
26
  prompt=full_prompt,
 
15
  message: str
16
 
17
  @app.post("/chat")
18
+ async def chat(message):
19
  system_prompt = (
20
  "You are a beginner programming student helping a peer. "
21
  "Offer hints, ask questions, and support understanding—don’t give full solutions."
22
  )
23
+ full_prompt = f"<s>[INST] <<SYS>>{system_prompt}<</SYS>>\n{message} [/INST]"
24
 
25
  output = client.text_generation(
26
  prompt=full_prompt,