Spaces:
Sleeping
Sleeping
Batchsize revert
Browse files- app/routes/ask_routes.py +1 -0
- app/services/embeddings.py +1 -1
app/routes/ask_routes.py
CHANGED
|
@@ -40,6 +40,7 @@ async def ask_question(request: QueryRequest):
|
|
| 40 |
# Format context
|
| 41 |
#context = retriever.format_context(results)
|
| 42 |
# Use reranked results for context
|
|
|
|
| 43 |
context = retriever.format_context(reranked_results)
|
| 44 |
|
| 45 |
# Generate answer
|
|
|
|
| 40 |
# Format context
|
| 41 |
#context = retriever.format_context(results)
|
| 42 |
# Use reranked results for context
|
| 43 |
+
## Bug IO Error
|
| 44 |
context = retriever.format_context(reranked_results)
|
| 45 |
|
| 46 |
# Generate answer
|
app/services/embeddings.py
CHANGED
|
@@ -39,7 +39,7 @@ class EmbeddingService:
|
|
| 39 |
def embed_batch(
|
| 40 |
self,
|
| 41 |
texts: List[str],
|
| 42 |
-
batch_size: int =
|
| 43 |
is_query: bool = False,
|
| 44 |
) -> List[List[float]]:
|
| 45 |
"""Generate embeddings for a batch of texts (queries or passages)."""
|
|
|
|
| 39 |
def embed_batch(
|
| 40 |
self,
|
| 41 |
texts: List[str],
|
| 42 |
+
batch_size: int = 32,
|
| 43 |
is_query: bool = False,
|
| 44 |
) -> List[List[float]]:
|
| 45 |
"""Generate embeddings for a batch of texts (queries or passages)."""
|