Isaacgv commited on
Commit
6401544
·
verified ·
1 Parent(s): 34f2b32

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +6 -1
agent.py CHANGED
@@ -137,9 +137,14 @@ def build_graph(provider: str = "huggingface"):
137
  elif provider == "huggingface":
138
  llm = ChatHuggingFace(
139
  llm=HuggingFaceEndpoint(
140
- url="https://api-inference.huggingface.co/models/Meta-DeepLearning/llama-2-7b-chat-hf",
 
 
 
 
141
  temperature=0,
142
  ),
 
143
  )
144
  else:
145
  raise ValueError("Invalid provider. Choose 'google', 'groq' or 'huggingface'.")
 
137
  elif provider == "huggingface":
138
  llm = ChatHuggingFace(
139
  llm=HuggingFaceEndpoint(
140
+ repo_id="TinyLlama/TinyLlama-1.1B-Chat-v1.0",
141
+ task="text-generation", # for chat‐style use “text-generation”
142
+ max_new_tokens=1024,
143
+ do_sample=False,
144
+ repetition_penalty=1.03,
145
  temperature=0,
146
  ),
147
+ verbose=True,
148
  )
149
  else:
150
  raise ValueError("Invalid provider. Choose 'google', 'groq' or 'huggingface'.")