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