Omnibus commited on
Commit
1184664
1 Parent(s): f08ef65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -5,12 +5,16 @@ client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
5
 
6
  from prompts import GAME_MASTER, COMPRESS_HISTORY
7
  def format_prompt(message, history):
8
- prompt = "<s>"
9
- for user_prompt, bot_response in history:
10
- prompt += f"[INST] {user_prompt} [/INST]"
11
- prompt += f" {bot_response}</s> "
12
- prompt += f"[INST] {message} [/INST]"
13
- return prompt
 
 
 
 
14
 
15
  def compress_history(purpose, task, history):
16
  resp = run_gpt(
 
5
 
6
  from prompts import GAME_MASTER, COMPRESS_HISTORY
7
  def format_prompt(message, history):
8
+ prompt=""
9
+ '''
10
+ prompt = "<s>"
11
+
12
+ for user_prompt, bot_response in history:
13
+ prompt += f"[INST] {user_prompt} [/INST]"
14
+ prompt += f" {bot_response}</s> "
15
+ '''
16
+ prompt += f"[INST] {message} [/INST]"
17
+ return prompt
18
 
19
  def compress_history(purpose, task, history):
20
  resp = run_gpt(