debisoft commited on
Commit
4feb4b9
·
1 Parent(s): 2287acc

fixing message content

Browse files
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -24,7 +24,7 @@ def get_completion(prompt, model="solar-1-mini-chat"):
24
  messages=messages,
25
  temperature=0, # this is the degree of randomness of the model's output
26
  )
27
- return response.choices[0].message["content"]
28
 
29
  def get_completion_from_messages(messages, model="solar-1-mini-chat", temperature=0):
30
  response = client.chat.completions.create(
@@ -32,6 +32,7 @@ def get_completion_from_messages(messages, model="solar-1-mini-chat", temperatur
32
  messages=messages,
33
  temperature=temperature, # this is the degree of randomness of the model's output
34
  )
 
35
 
36
  # Chat message component (renders a chat bubble)
37
  def ChatMessage(msg, user):
 
24
  messages=messages,
25
  temperature=0, # this is the degree of randomness of the model's output
26
  )
27
+ return response.choices[0].message.content
28
 
29
  def get_completion_from_messages(messages, model="solar-1-mini-chat", temperature=0):
30
  response = client.chat.completions.create(
 
32
  messages=messages,
33
  temperature=temperature, # this is the degree of randomness of the model's output
34
  )
35
+ return response.choices[0].message.content
36
 
37
  # Chat message component (renders a chat bubble)
38
  def ChatMessage(msg, user):