Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -310,9 +310,8 @@ class RetrievalTool(Tool):
|
|
310 |
}
|
311 |
output_type = "string"
|
312 |
|
313 |
-
|
314 |
-
|
315 |
-
def forward(self, query: str, k: int = 3) -> str:
|
316 |
if vectorstore is None or embeddings is None: # Added check for embeddings
|
317 |
return "Vector store is not initialized or embeddings are missing. No documents available for retrieval."
|
318 |
|
@@ -329,6 +328,7 @@ class RetrievalTool(Tool):
|
|
329 |
logger.error(f"Error retrieving from vector store for query '{query}': {e}")
|
330 |
return f"Error retrieving from vector store: {str(e)}"
|
331 |
|
|
|
332 |
class ChessAnalysisAPITool(Tool):
|
333 |
"""
|
334 |
Analyzes a chess position provided in FEN format using a remote chess engine API (chess-api.com).
|
|
|
310 |
}
|
311 |
output_type = "string"
|
312 |
|
313 |
+
|
314 |
+
def forward(self, query: str, k: int = 3) -> str:
|
|
|
315 |
if vectorstore is None or embeddings is None: # Added check for embeddings
|
316 |
return "Vector store is not initialized or embeddings are missing. No documents available for retrieval."
|
317 |
|
|
|
328 |
logger.error(f"Error retrieving from vector store for query '{query}': {e}")
|
329 |
return f"Error retrieving from vector store: {str(e)}"
|
330 |
|
331 |
+
|
332 |
class ChessAnalysisAPITool(Tool):
|
333 |
"""
|
334 |
Analyzes a chess position provided in FEN format using a remote chess engine API (chess-api.com).
|