freddyaboulton HF staff commited on
Commit
18ccec5
·
1 Parent(s): 9cf1298

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -66,10 +66,10 @@ async def chat(ctx, prompt: str):
66
  try:
67
  message = await ctx.send("Creating thread...")
68
 
69
- thread = await message.create_thread(name=prompt)
70
  loop = asyncio.get_running_loop()
71
  client = await loop.run_in_executor(None, get_client, None)
72
- job = client.submit(prompt, api_name="/chat")
73
  await wait(job)
74
 
75
  try:
@@ -92,7 +92,7 @@ async def continue_chat(message):
92
  try:
93
  client = thread_to_client[message.channel.id]
94
  prompt = message.content
95
- job = client.submit(prompt, api_name="/chat")
96
  await wait(job)
97
  try:
98
  job.result()
 
66
  try:
67
  message = await ctx.send("Creating thread...")
68
 
69
+ thread = await message.create_thread(name=prompt[:100])
70
  loop = asyncio.get_running_loop()
71
  client = await loop.run_in_executor(None, get_client, None)
72
+ job = client.submit(prompt, system_prompt="", temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0, api_name="/chat")
73
  await wait(job)
74
 
75
  try:
 
92
  try:
93
  client = thread_to_client[message.channel.id]
94
  prompt = message.content
95
+ job = client.submit(prompt, system_prompt="", temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0, api_name="/chat")
96
  await wait(job)
97
  try:
98
  job.result()