Spaces:
Running
Running
Update agent.py
Browse files
agent.py
CHANGED
@@ -442,64 +442,15 @@ retriever = vector_store.as_retriever()
|
|
442 |
# -------------------------------
|
443 |
# Step 6: Create LangChain Tools
|
444 |
# -------------------------------
|
445 |
-
wiki_tool =
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
description="Perform mathematical calculations."
|
455 |
-
)
|
456 |
-
|
457 |
-
file_tool = Tool(
|
458 |
-
name="File_Analysis",
|
459 |
-
func=analyze_attachment().run, # Replace with a file analysis function
|
460 |
-
description="Analyze and extract data from attachments."
|
461 |
-
)
|
462 |
-
|
463 |
-
|
464 |
-
web_tool = Tool(
|
465 |
-
name="web_search",
|
466 |
-
func=web_search().run,
|
467 |
-
description="Perform web search."
|
468 |
-
)
|
469 |
-
|
470 |
-
|
471 |
-
arvix_tool = Tool(
|
472 |
-
name="arvix_search",
|
473 |
-
func=arvix_search().run,
|
474 |
-
description="Perform arvix search."
|
475 |
-
)
|
476 |
-
|
477 |
-
youtube_tool = Tool(
|
478 |
-
name="get_youtube_transcript",
|
479 |
-
func=get_youtube_transcript().run,
|
480 |
-
description="get youtube transcript."
|
481 |
-
)
|
482 |
-
|
483 |
-
|
484 |
-
video_tool = Tool(
|
485 |
-
name="extract_video_id",
|
486 |
-
func=extract_video_id().run,
|
487 |
-
description="extract_video_id."
|
488 |
-
)
|
489 |
-
|
490 |
-
|
491 |
-
analyze_tool = Tool(
|
492 |
-
name="analyze_attachment",
|
493 |
-
func=analyze_attachment().run,
|
494 |
-
description="analyze attachment."
|
495 |
-
)
|
496 |
-
|
497 |
-
|
498 |
-
wikiq_tool = Tool(
|
499 |
-
name="wikidata_query",
|
500 |
-
func=wikidata_query().run,
|
501 |
-
description="wikidata query."
|
502 |
-
)
|
503 |
|
504 |
|
505 |
# -------------------------------
|
|
|
442 |
# -------------------------------
|
443 |
# Step 6: Create LangChain Tools
|
444 |
# -------------------------------
|
445 |
+
wiki_tool = WikipediaAPIWrapper() # If it's a proper LangChain tool
|
446 |
+
calc_tool = calculator
|
447 |
+
file_tool = analyze_attachment
|
448 |
+
web_tool = web_search
|
449 |
+
arvix_tool = arvix_search
|
450 |
+
youtube_tool = get_youtube_transcript
|
451 |
+
video_tool = extract_video_id
|
452 |
+
analyze_tool = analyze_attachment
|
453 |
+
wikiq_tool = wikidata_query
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
|
455 |
|
456 |
# -------------------------------
|