lunarflu HF Staff commited on
Commit
0856426
·
1 Parent(s): d689ca8

Update falcon.py

Browse files
Files changed (1) hide show
  1. falcon.py +10 -4
falcon.py CHANGED
@@ -20,8 +20,11 @@ def falcon_initial_generation(prompt, instructions, thread):
20
  """Solves two problems at once; 1) The Slash command + job.submit interaction, and 2) the need for job.submit in order to locate the full generated text"""
21
  global threadid_conversation
22
 
23
- chathistory = falcon_client.predict(fn_index=5)
24
- job = falcon_client.submit(prompt, chathistory, instructions, 0.8, 0.9, fn_index=1)
 
 
 
25
  while job.done() is False:
26
  pass
27
  else:
@@ -80,12 +83,15 @@ async def continue_falcon(message):
80
  global instructions
81
  global threadid_conversation
82
  await message.add_reaction('🔁')
83
- chathistory = threadid_conversation[message.channel.id]
84
  prompt = message.content
 
 
 
85
 
86
  if os.environ.get('TEST_ENV') == 'True':
87
  print("Running falcon_client.submit")
88
- job = falcon_client.submit(prompt, chathistory, instructions, 0.8, 0.9, fn_index=1)
89
  while job.done() is False:
90
  pass
91
  else:
 
20
  """Solves two problems at once; 1) The Slash command + job.submit interaction, and 2) the need for job.submit in order to locate the full generated text"""
21
  global threadid_conversation
22
 
23
+ chathistory = falcon_client.predict(fn_index=5)
24
+ temperature = 0.8
25
+ p_nucleus_sampling = 0.9
26
+
27
+ job = falcon_client.submit(prompt, chathistory, instructions, temperature, p_nucleus_sampling, fn_index=1)
28
  while job.done() is False:
29
  pass
30
  else:
 
83
  global instructions
84
  global threadid_conversation
85
  await message.add_reaction('🔁')
86
+
87
  prompt = message.content
88
+ chathistory = threadid_conversation[message.channel.id]
89
+ temperature = 0.8
90
+ p_nucleus_sampling = 0.9
91
 
92
  if os.environ.get('TEST_ENV') == 'True':
93
  print("Running falcon_client.submit")
94
+ job = falcon_client.submit(prompt, chathistory, instructions, temperature, p_nucleus_sampling, fn_index=1)
95
  while job.done() is False:
96
  pass
97
  else: