debisoft commited on
Commit
9d599b4
·
1 Parent(s): 559d5b6
Files changed (1) hide show
  1. main.py +3 -0
main.py CHANGED
@@ -15,6 +15,8 @@ client = OpenAI(
15
  base_url="https://api.upstage.ai/v1/solar"
16
  )
17
 
 
 
18
  def get_completion_from_messages(messages, model="solar-1-mini-chat", temperature=0):
19
  response = client.chat.completions.create(
20
  model=model,
@@ -54,6 +56,7 @@ def index():
54
  def send(msg:str, messages:list[str]=None):
55
  if not messages: messages = []
56
  messages.append(msg.rstrip())
 
57
  r = get_completion_from_messages(messages) # get response from chat model
58
  return (ChatMessage(msg, True), # The user's message
59
  ChatMessage(r.rstrip(), False), # The chatbot's response
 
15
  base_url="https://api.upstage.ai/v1/solar"
16
  )
17
 
18
+ sp = "You are a helpful and concise assistant."
19
+
20
  def get_completion_from_messages(messages, model="solar-1-mini-chat", temperature=0):
21
  response = client.chat.completions.create(
22
  model=model,
 
56
  def send(msg:str, messages:list[str]=None):
57
  if not messages: messages = []
58
  messages.append(msg.rstrip())
59
+ print(messages)
60
  r = get_completion_from_messages(messages) # get response from chat model
61
  return (ChatMessage(msg, True), # The user's message
62
  ChatMessage(r.rstrip(), False), # The chatbot's response