Update app.py
Browse files
app.py
CHANGED
|
@@ -34,15 +34,6 @@ def reverse_text(text: str) -> str:
|
|
| 34 |
"""Reverse the input string"""
|
| 35 |
return text[::-1]
|
| 36 |
|
| 37 |
-
@tool
|
| 38 |
-
def chess_best_move(fen: str, time_limit: float = 0.1) -> str:
|
| 39 |
-
"""Best move in UCI notation for given FEN"""
|
| 40 |
-
board = chess.Board(fen)
|
| 41 |
-
engine = chess.engine.SimpleEngine.popen_uci("/usr/bin/stockfish")
|
| 42 |
-
result = engine.play(board, chess.engine.Limit(time=time_limit))
|
| 43 |
-
engine.quit()
|
| 44 |
-
return result.move.uci()
|
| 45 |
-
|
| 46 |
@tool
|
| 47 |
def find_non_commutative(table: dict) -> list:
|
| 48 |
"""Elements involved in non-commutativity"""
|
|
@@ -100,7 +91,6 @@ TOOLS = [
|
|
| 100 |
wiki_get_page,
|
| 101 |
youtube_transcript,
|
| 102 |
reverse_text,
|
| 103 |
-
chess_best_move,
|
| 104 |
find_non_commutative,
|
| 105 |
libretext_extract,
|
| 106 |
classify_vegetables,
|
|
@@ -113,7 +103,6 @@ SYSTEM_MESSAGE = """You are a concise AI assistant with access to the following
|
|
| 113 |
- wiki_get_page(title: string) β string
|
| 114 |
- youtube_transcript(video_id: string) β string
|
| 115 |
- reverse_text(text: string) β string
|
| 116 |
-
- chess_best_move(fen: string, time_limit: float) β string
|
| 117 |
- find_non_commutative(table: dict) β list[string]
|
| 118 |
- libretext_extract(url: string, selector: string) β string
|
| 119 |
- classify_vegetables(items: list[string]) β list[string]
|
|
|
|
| 34 |
"""Reverse the input string"""
|
| 35 |
return text[::-1]
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
@tool
|
| 38 |
def find_non_commutative(table: dict) -> list:
|
| 39 |
"""Elements involved in non-commutativity"""
|
|
|
|
| 91 |
wiki_get_page,
|
| 92 |
youtube_transcript,
|
| 93 |
reverse_text,
|
|
|
|
| 94 |
find_non_commutative,
|
| 95 |
libretext_extract,
|
| 96 |
classify_vegetables,
|
|
|
|
| 103 |
- wiki_get_page(title: string) β string
|
| 104 |
- youtube_transcript(video_id: string) β string
|
| 105 |
- reverse_text(text: string) β string
|
|
|
|
| 106 |
- find_non_commutative(table: dict) β list[string]
|
| 107 |
- libretext_extract(url: string, selector: string) β string
|
| 108 |
- classify_vegetables(items: list[string]) β list[string]
|