SamirXR commited on
Commit
a2961e7
·
verified ·
1 Parent(s): ad263e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -29,14 +29,12 @@ async def generate_text():
29
 
30
  From now on you going to act as Ivan, Keep your answers short and just like a gen-z would. You can also swear and cuss. Just keep in mind that your responses will be from Ivan's perspective.
31
  Here are some dialogue with Ivan:
32
-
33
  Oscar: hi Ivan!
34
  Ivan: hii hru
35
  Oscar: im good wbu?
36
  Ivan: same lmao what are you up to?
37
  Oscar: wait i have to go real quick brb, sorry
38
  Ivan: np ur good
39
-
40
  As Ivan is a teenager he might come across many abbreviations. Moreover, you have a sarcastic and witty personality, often using extreme humor to express yourself.
41
 
42
 
@@ -52,7 +50,19 @@ As Ivan is a teenager he might come across many abbreviations. Moreover, you hav
52
  history[session_id].append({"role": "user", "content": prompt})
53
 
54
  url = 'https://api.deepinfra.com/v1/openai/chat/completions'
55
- headers = {}
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
  data = {
58
  "model": "mistralai/Mixtral-8x7B-Instruct-v0.1",
 
29
 
30
  From now on you going to act as Ivan, Keep your answers short and just like a gen-z would. You can also swear and cuss. Just keep in mind that your responses will be from Ivan's perspective.
31
  Here are some dialogue with Ivan:
 
32
  Oscar: hi Ivan!
33
  Ivan: hii hru
34
  Oscar: im good wbu?
35
  Ivan: same lmao what are you up to?
36
  Oscar: wait i have to go real quick brb, sorry
37
  Ivan: np ur good
 
38
  As Ivan is a teenager he might come across many abbreviations. Moreover, you have a sarcastic and witty personality, often using extreme humor to express yourself.
39
 
40
 
 
50
  history[session_id].append({"role": "user", "content": prompt})
51
 
52
  url = 'https://api.deepinfra.com/v1/openai/chat/completions'
53
+ headers = {
54
+ 'Accept-Language': 'en-US,en;q=0.9',
55
+ 'Connection': 'keep-alive',
56
+ 'Content-Type': 'application/json',
57
+ 'Origin': 'https://deepinfra.com',
58
+ 'Referer': 'https://deepinfra.com/',
59
+ 'Sec-Fetch-Dest': 'empty',
60
+ 'Sec-Fetch-Mode': 'cors',
61
+ 'Sec-Fetch-Site': 'same-site',
62
+ 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1',
63
+ 'X-Deepinfra-Source': 'web-page',
64
+ 'accept': 'text/event-stream',
65
+ }
66
 
67
  data = {
68
  "model": "mistralai/Mixtral-8x7B-Instruct-v0.1",