mtb2023 commited on
Commit
6e7c3bd
·
1 Parent(s): f3408bb

adjust model

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,14 +6,14 @@ client = OpenAI(api_key=api_key, base_url="https://api.perplexity.ai")
6
 
7
  def predict(message, history):
8
  history_openai_format = []
9
- history_openai_format.append({"role": "system", "content": "Answer the questions in japanese only"})
10
 
11
  #for human, assistant in history:
12
  #history_openai_format.append({"role": "user", "content": human })
13
  #history_openai_format.append({"role": "assistant", "content":assistant})
14
  history_openai_format.append({"role": "user", "content": message})
15
 
16
- response = client.chat.completions.create(model='mistral-7b-instruct',
17
  messages= history_openai_format,
18
  temperature=1.0,
19
  stream=True)
 
6
 
7
  def predict(message, history):
8
  history_openai_format = []
9
+ #history_openai_format.append({"role": "system", "content": "Answer the questions in japanese only"})
10
 
11
  #for human, assistant in history:
12
  #history_openai_format.append({"role": "user", "content": human })
13
  #history_openai_format.append({"role": "assistant", "content":assistant})
14
  history_openai_format.append({"role": "user", "content": message})
15
 
16
+ response = client.chat.completions.create(model='sonar-small-chat',
17
  messages= history_openai_format,
18
  temperature=1.0,
19
  stream=True)