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