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