annikwag commited on
Commit
d8bc0a6
·
verified ·
1 Parent(s): 5d30e29

Update appStore/rag_utils.py

Browse files
Files changed (1) hide show
  1. appStore/rag_utils.py +1 -1
appStore/rag_utils.py CHANGED
@@ -101,7 +101,7 @@ def get_rag_answer(query, top_results, endpoint, token):
101
  # Build the context
102
  from appStore.rag_utils import truncate_to_tokens, build_context_for_result, compute_title
103
  context = "\n\n".join([build_context_for_result(res, compute_title) for res in top_results])
104
- context = truncate_to_tokens(context, 6500) # Truncate to ~11.5k tokens
105
 
106
  # Construct the prompt
107
  prompt = (
 
101
  # Build the context
102
  from appStore.rag_utils import truncate_to_tokens, build_context_for_result, compute_title
103
  context = "\n\n".join([build_context_for_result(res, compute_title) for res in top_results])
104
+ context = truncate_to_tokens(context,11500) # Truncate to ~11.5k tokens
105
 
106
  # Construct the prompt
107
  prompt = (