Isaacgv commited on
Commit
aeb36b0
·
verified ·
1 Parent(s): 1f65019

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +4 -1
agent.py CHANGED
@@ -14,6 +14,8 @@ from langchain_core.messages import SystemMessage, HumanMessage
14
  from langchain_core.tools import tool
15
  from langchain.tools.retriever import create_retriever_tool
16
  from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI
 
 
17
 
18
  load_dotenv()
19
 
@@ -136,7 +138,8 @@ def build_graph(provider: str = "huggingface"):
136
  # Groq https://console.groq.com/docs/models
137
  llm = ChatGroq(model="qwen-qwq-32b", temperature=0) # optional : qwen-qwq-32b gemma2-9b-it
138
  elif provider == "huggingface":
139
- llm = HuggingFaceInferenceAPI(model_name="Qwen/Qwen2.5-Coder-32B-Instruct")
 
140
  else:
141
  raise ValueError("Invalid provider. Choose 'google', 'groq' or 'huggingface'.")
142
  # Bind tools to LLM
 
14
  from langchain_core.tools import tool
15
  from langchain.tools.retriever import create_retriever_tool
16
  from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI
17
+ from smolagents import CodeAgent, InferenceClientModel
18
+
19
 
20
  load_dotenv()
21
 
 
138
  # Groq https://console.groq.com/docs/models
139
  llm = ChatGroq(model="qwen-qwq-32b", temperature=0) # optional : qwen-qwq-32b gemma2-9b-it
140
  elif provider == "huggingface":
141
+ llm = InferenceClientModel()
142
+
143
  else:
144
  raise ValueError("Invalid provider. Choose 'google', 'groq' or 'huggingface'.")
145
  # Bind tools to LLM