mgokg commited on
Commit
1e4e902
·
verified ·
1 Parent(s): 09e15cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -22,13 +22,14 @@ json_schema = """
22
  }
23
  """
24
 
25
- def llm(message):
 
26
  try:
27
  completion = client.chat.completions.create(
28
  model="llama3-70b-8192",
29
  messages=[
30
  {"role": "system", "content": "You are a helpful assistant."},
31
- {"role": "user", "content": f "return a json object. here is the schema \n {json_schema} \n fill in the avaiable values which can be found here:\n {message} \n return valid json only"}
32
  ],
33
  )
34
  return completion.choices[0].message.content
 
22
  }
23
  """
24
 
25
+ def llm(message)
26
+ message = f"return a json object. here is the schema \n {json_schema} \n fill in the avaiable values which can be found here:\n {message} \n return valid json only"}
27
  try:
28
  completion = client.chat.completions.create(
29
  model="llama3-70b-8192",
30
  messages=[
31
  {"role": "system", "content": "You are a helpful assistant."},
32
+ {"role": "user", "content": f"{message}"}
33
  ],
34
  )
35
  return completion.choices[0].message.content