Update app.py
Browse files
app.py
CHANGED
|
@@ -34,6 +34,9 @@ TAVILY_API_KEY = os.getenv("TAVILY_API_KEY")
|
|
| 34 |
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
|
| 35 |
##HUGGINGFACEHUB_API_TOKEN = os.getenv("HUGGINGFACEHUB_API_TOKEN")
|
| 36 |
|
|
|
|
|
|
|
|
|
|
| 37 |
#PROMPTS
|
| 38 |
#prompt_recomendado = """You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the following template:
|
| 39 |
# FINAL ANSWER: [YOUR FINAL ANSWER]. YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
|
|
@@ -61,7 +64,7 @@ prompt_search = """You are a web research agent.
|
|
| 61 |
|
| 62 |
#TOOLS
|
| 63 |
web_search = TavilySearch(
|
| 64 |
-
max_results=
|
| 65 |
topic="general",
|
| 66 |
)
|
| 67 |
|
|
@@ -116,7 +119,7 @@ class BasicAgent:
|
|
| 116 |
# chat_with_tools = chat.bind_tools(tools)
|
| 117 |
|
| 118 |
def __call__(self, question: str) -> str:
|
| 119 |
-
print(f"Agent received question
|
| 120 |
|
| 121 |
messages = {
|
| 122 |
"messages": [
|
|
|
|
| 34 |
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
|
| 35 |
##HUGGINGFACEHUB_API_TOKEN = os.getenv("HUGGINGFACEHUB_API_TOKEN")
|
| 36 |
|
| 37 |
+
CHESSVISION_TO_FEN_URL = "http://app.chessvision.ai/predict"
|
| 38 |
+
CHESS_MOVE_API = "https://chess-api.com/v1"
|
| 39 |
+
|
| 40 |
#PROMPTS
|
| 41 |
#prompt_recomendado = """You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the following template:
|
| 42 |
# FINAL ANSWER: [YOUR FINAL ANSWER]. YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
|
|
|
|
| 64 |
|
| 65 |
#TOOLS
|
| 66 |
web_search = TavilySearch(
|
| 67 |
+
max_results=5,
|
| 68 |
topic="general",
|
| 69 |
)
|
| 70 |
|
|
|
|
| 119 |
# chat_with_tools = chat.bind_tools(tools)
|
| 120 |
|
| 121 |
def __call__(self, question: str) -> str:
|
| 122 |
+
print(f"Agent received question : {question}...")
|
| 123 |
|
| 124 |
messages = {
|
| 125 |
"messages": [
|