Edited final_answer
Browse files
tools/.ipynb_checkpoints/final_answer-checkpoint.py
CHANGED
@@ -27,7 +27,7 @@ class FinalAnswerTool(Tool):
|
|
27 |
"""
|
28 |
Determines the type of answer and formats it accordingly.
|
29 |
"""
|
30 |
-
# Case 1: If the answer is a string, return it
|
31 |
if isinstance(answer, str):
|
32 |
return f"📌 **Final Answer:**\n\n{answer}"
|
33 |
|
@@ -39,13 +39,11 @@ class FinalAnswerTool(Tool):
|
|
39 |
title = job.get("Title", "N/A")
|
40 |
company = job.get("Company", "N/A")
|
41 |
location = job.get("Location", "Anywhere")
|
42 |
-
link = job.get("Link", "#") # Provide a default link if missing
|
43 |
|
44 |
formatted_output += (
|
45 |
f"**{idx}. {title}**\n"
|
46 |
f" - **Company:** {company}\n"
|
47 |
-
f" - **Location:** {location}\n"
|
48 |
-
f" - **🔗 [Apply Here]({link})**\n\n"
|
49 |
)
|
50 |
return formatted_output
|
51 |
|
|
|
27 |
"""
|
28 |
Determines the type of answer and formats it accordingly.
|
29 |
"""
|
30 |
+
# Case 1: If the answer is a simple string, return it directly
|
31 |
if isinstance(answer, str):
|
32 |
return f"📌 **Final Answer:**\n\n{answer}"
|
33 |
|
|
|
39 |
title = job.get("Title", "N/A")
|
40 |
company = job.get("Company", "N/A")
|
41 |
location = job.get("Location", "Anywhere")
|
|
|
42 |
|
43 |
formatted_output += (
|
44 |
f"**{idx}. {title}**\n"
|
45 |
f" - **Company:** {company}\n"
|
46 |
+
f" - **Location:** {location}\n\n"
|
|
|
47 |
)
|
48 |
return formatted_output
|
49 |
|
tools/final_answer.py
CHANGED
@@ -27,7 +27,7 @@ class FinalAnswerTool(Tool):
|
|
27 |
"""
|
28 |
Determines the type of answer and formats it accordingly.
|
29 |
"""
|
30 |
-
# Case 1: If the answer is a string, return it
|
31 |
if isinstance(answer, str):
|
32 |
return f"📌 **Final Answer:**\n\n{answer}"
|
33 |
|
@@ -39,13 +39,11 @@ class FinalAnswerTool(Tool):
|
|
39 |
title = job.get("Title", "N/A")
|
40 |
company = job.get("Company", "N/A")
|
41 |
location = job.get("Location", "Anywhere")
|
42 |
-
link = job.get("Link", "#") # Provide a default link if missing
|
43 |
|
44 |
formatted_output += (
|
45 |
f"**{idx}. {title}**\n"
|
46 |
f" - **Company:** {company}\n"
|
47 |
-
f" - **Location:** {location}\n"
|
48 |
-
f" - **🔗 [Apply Here]({link})**\n\n"
|
49 |
)
|
50 |
return formatted_output
|
51 |
|
|
|
27 |
"""
|
28 |
Determines the type of answer and formats it accordingly.
|
29 |
"""
|
30 |
+
# Case 1: If the answer is a simple string, return it directly
|
31 |
if isinstance(answer, str):
|
32 |
return f"📌 **Final Answer:**\n\n{answer}"
|
33 |
|
|
|
39 |
title = job.get("Title", "N/A")
|
40 |
company = job.get("Company", "N/A")
|
41 |
location = job.get("Location", "Anywhere")
|
|
|
42 |
|
43 |
formatted_output += (
|
44 |
f"**{idx}. {title}**\n"
|
45 |
f" - **Company:** {company}\n"
|
46 |
+
f" - **Location:** {location}\n\n"
|
|
|
47 |
)
|
48 |
return formatted_output
|
49 |
|