Update agent.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
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 |
|