main.py
CHANGED
|
@@ -120,7 +120,7 @@ def get_completion(prompt, model="solar-1-mini-chat"):
|
|
| 120 |
messages=messages,
|
| 121 |
temperature=0, # this is the degree of randomness of the model's output
|
| 122 |
)
|
| 123 |
-
return response.choices[
|
| 124 |
|
| 125 |
def get_completion_from_messages(messages, model="solar-1-mini-chat", temperature=0):
|
| 126 |
response = client.chat.completions.create(
|
|
@@ -128,7 +128,7 @@ def get_completion_from_messages(messages, model="solar-1-mini-chat", temperatur
|
|
| 128 |
messages=messages,
|
| 129 |
temperature=temperature, # this is the degree of randomness of the model's output
|
| 130 |
)
|
| 131 |
-
return response.choices[
|
| 132 |
|
| 133 |
# Chat message component (renders a chat bubble)
|
| 134 |
def ChatMessage(msg, user):
|
|
|
|
| 120 |
messages=messages,
|
| 121 |
temperature=0, # this is the degree of randomness of the model's output
|
| 122 |
)
|
| 123 |
+
return response.choices[-1].message.content
|
| 124 |
|
| 125 |
def get_completion_from_messages(messages, model="solar-1-mini-chat", temperature=0):
|
| 126 |
response = client.chat.completions.create(
|
|
|
|
| 128 |
messages=messages,
|
| 129 |
temperature=temperature, # this is the degree of randomness of the model's output
|
| 130 |
)
|
| 131 |
+
return response.choices[-1].message.content
|
| 132 |
|
| 133 |
# Chat message component (renders a chat bubble)
|
| 134 |
def ChatMessage(msg, user):
|