HCho commited on
Commit
2b2cfe5
·
verified ·
1 Parent(s): d211e1b

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -0
agent.py CHANGED
@@ -18,6 +18,7 @@ from langchain_google_genai import ChatGoogleGenerativeAI
18
 
19
  #load_dotenv()
20
  google_api_key = os.environ["GOOGLE_API_KEY"]
 
21
 
22
  @tool
23
  def add(a: int, b: int) -> int:
@@ -111,6 +112,7 @@ def build_graph(provider: str = "huggingface"):
111
  llm=HuggingFaceEndpoint(
112
  url="https://api-inference.huggingface.co/models/Meta-DeepLearning/llama-2-7b-chat-hf",
113
  temperature=0,
 
114
  ),
115
  )
116
  def assistant(state: MessagesState):
 
18
 
19
  #load_dotenv()
20
  google_api_key = os.environ["GOOGLE_API_KEY"]
21
+ hf_api_key = os.environ["HF_API_KEY"]
22
 
23
  @tool
24
  def add(a: int, b: int) -> int:
 
112
  llm=HuggingFaceEndpoint(
113
  url="https://api-inference.huggingface.co/models/Meta-DeepLearning/llama-2-7b-chat-hf",
114
  temperature=0,
115
+ huggingfacehub_api_token=hf_api_key
116
  ),
117
  )
118
  def assistant(state: MessagesState):