Shreyas094 commited on
Commit
3f2d510
·
verified ·
1 Parent(s): e41e262

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -117,7 +117,7 @@ def update_vectors(files, parser):
117
  label="Select documents to query"
118
  )
119
 
120
- def generate_chunked_response(prompt, model, max_tokens=1000, num_calls=3, temperature=0.2, should_stop=False):
121
  print(f"Starting generate_chunked_response with {num_calls} calls")
122
  full_response = ""
123
  messages = [{"role": "user", "content": prompt}]
@@ -325,7 +325,8 @@ After writing the document, please provide a list of sources used in your respon
325
  payload = {
326
  "messages": inputs,
327
  "stream": True,
328
- "temperature": temperature
 
329
  }
330
 
331
  full_response = ""
@@ -376,7 +377,7 @@ After writing the document, please provide a list of sources used in your respon
376
  for i in range(num_calls):
377
  for message in client.chat_completion(
378
  messages=[{"role": "user", "content": prompt}],
379
- max_tokens=1000,
380
  temperature=temperature,
381
  stream=True,
382
  ):
@@ -437,7 +438,7 @@ Write a detailed and complete response that answers the following user question:
437
  logging.info(f"API call {i+1}/{num_calls}")
438
  for message in client.chat_completion(
439
  messages=[{"role": "user", "content": prompt}],
440
- max_tokens=1000,
441
  temperature=temperature,
442
  stream=True,
443
  ):
 
117
  label="Select documents to query"
118
  )
119
 
120
+ def generate_chunked_response(prompt, model, max_tokens=30000, num_calls=3, temperature=0.2, should_stop=False):
121
  print(f"Starting generate_chunked_response with {num_calls} calls")
122
  full_response = ""
123
  messages = [{"role": "user", "content": prompt}]
 
325
  payload = {
326
  "messages": inputs,
327
  "stream": True,
328
+ "temperature": temperature,
329
+ "max_tokens": 32000
330
  }
331
 
332
  full_response = ""
 
377
  for i in range(num_calls):
378
  for message in client.chat_completion(
379
  messages=[{"role": "user", "content": prompt}],
380
+ max_tokens=30000,
381
  temperature=temperature,
382
  stream=True,
383
  ):
 
438
  logging.info(f"API call {i+1}/{num_calls}")
439
  for message in client.chat_completion(
440
  messages=[{"role": "user", "content": prompt}],
441
+ max_tokens=30000,
442
  temperature=temperature,
443
  stream=True,
444
  ):