Spaces:
Configuration error
Configuration error
Enrico Mannarino commited on
Commit ·
cadf170
1
Parent(s): 42551f0
daje
Browse files
agent.py
CHANGED
|
@@ -11,9 +11,6 @@ from langchain_community.tools import DuckDuckGoSearchRun, WikipediaQueryRun, Ar
|
|
| 11 |
from langchain_community.utilities import WikipediaAPIWrapper, ArxivAPIWrapper
|
| 12 |
from langchain_community.tools.wikidata.tool import WikidataAPIWrapper, WikidataQueryRun
|
| 13 |
|
| 14 |
-
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 15 |
-
|
| 16 |
-
|
| 17 |
from tools import GetYouTubeTranscriptTool, ImageRecognitionTool
|
| 18 |
from dotenv import load_dotenv
|
| 19 |
import os
|
|
@@ -55,7 +52,11 @@ def build_graph():
|
|
| 55 |
else:
|
| 56 |
return "continue"
|
| 57 |
|
| 58 |
-
model =
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
tools = [GetYouTubeTranscriptTool(),
|
| 61 |
WikidataQueryRun(api_wrapper=WikidataAPIWrapper()),
|
|
|
|
| 11 |
from langchain_community.utilities import WikipediaAPIWrapper, ArxivAPIWrapper
|
| 12 |
from langchain_community.tools.wikidata.tool import WikidataAPIWrapper, WikidataQueryRun
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
from tools import GetYouTubeTranscriptTool, ImageRecognitionTool
|
| 15 |
from dotenv import load_dotenv
|
| 16 |
import os
|
|
|
|
| 52 |
else:
|
| 53 |
return "continue"
|
| 54 |
|
| 55 |
+
model = ChatHuggingFace(
|
| 56 |
+
repo_id="mistralai/Mistral-7B-Instruct-v0.1",
|
| 57 |
+
task="text-generation",
|
| 58 |
+
huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN,
|
| 59 |
+
)
|
| 60 |
|
| 61 |
tools = [GetYouTubeTranscriptTool(),
|
| 62 |
WikidataQueryRun(api_wrapper=WikidataAPIWrapper()),
|