Z3ktrix commited on
Commit
5cc790b
Β·
verified Β·
1 Parent(s): 9420ac5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,7 +52,7 @@ async def on_ready():
52
 
53
  @bot.command(name='ask')
54
  @commands.cooldown(rate=1, per=10, type=commands.BucketType.user)
55
- async def ask(ctx, question: str, temperature: float = 0.5, max_tokens: int = 100, top_k: int = 50, top_p: float = 0.9):
56
  """
57
  Command to ask a question to the Hugging Face model with an instructive prompt.
58
  """
@@ -67,7 +67,7 @@ async def ask(ctx, question: str, temperature: float = 0.5, max_tokens: int = 10
67
  return
68
 
69
  # Create a structured prompt
70
- prompt = f"Answer the following question as accurately and concisely as possible: {question}"
71
  response = query_huggingface(prompt, temperature, max_tokens, top_k, top_p)
72
 
73
  # Extract and clean the response
 
52
 
53
  @bot.command(name='ask')
54
  @commands.cooldown(rate=1, per=10, type=commands.BucketType.user)
55
+ async def ask(ctx, question: str, temperature: float = 0.8, max_tokens: int = 1000, top_k: int = 70, top_p: float = 0.4):
56
  """
57
  Command to ask a question to the Hugging Face model with an instructive prompt.
58
  """
 
67
  return
68
 
69
  # Create a structured prompt
70
+ prompt = f"Do not under any circumstance, finish or add to the input. Excluded input correction or finishing at all times. Answer the following question as accurately and concisely as possible: {question}"
71
  response = query_huggingface(prompt, temperature, max_tokens, top_k, top_p)
72
 
73
  # Extract and clean the response