updating the max token
Browse files
app.py
CHANGED
|
@@ -64,7 +64,7 @@ def truncate_content_to_token_limit(content, max_tokens=1200):
|
|
| 64 |
return truncated_content
|
| 65 |
|
| 66 |
|
| 67 |
-
def search_similar_documents(query, max_tokens=
|
| 68 |
"""Search for the most similar document and truncate the content to a token limit."""
|
| 69 |
query_embedding = embedding_model.encode(query).reshape(1, -1)
|
| 70 |
distances, indices = index.search(query_embedding, 1) # Retrieve the top-1 result
|
|
|
|
| 64 |
return truncated_content
|
| 65 |
|
| 66 |
|
| 67 |
+
def search_similar_documents(query, max_tokens=1200):
|
| 68 |
"""Search for the most similar document and truncate the content to a token limit."""
|
| 69 |
query_embedding = embedding_model.encode(query).reshape(1, -1)
|
| 70 |
distances, indices = index.search(query_embedding, 1) # Retrieve the top-1 result
|