AksharaSachin commited on
Commit
9d03e14
·
verified ·
1 Parent(s): 1b5e00f

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +6 -2
agent.py CHANGED
@@ -46,8 +46,12 @@ def build_agent():
46
  # huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
47
  # )
48
 
49
- llm = HuggingFaceHub(repo_id="distilbert/distilgpt2",
50
- task="text-generation")
 
 
 
 
51
 
52
  tools = [use_wikipedia_tool, use_search_tool]
53
 
 
46
  # huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
47
  # )
48
 
49
+ llm = HuggingFaceHub(repo_id="distilbert/distilgpt2", task="text-generation",
50
+ model_kwargs={
51
+ "temperature": 0.7, # Controls randomness (0.0 = deterministic)
52
+ "max_new_tokens": 100 # Optional: max output length
53
+ },
54
+ verbose=True )
55
 
56
  tools = [use_wikipedia_tool, use_search_tool]
57