Update app.py
Browse files
app.py
CHANGED
|
@@ -42,6 +42,9 @@ def send_email(to_email, subject, body):
|
|
| 42 |
except Exception as e:
|
| 43 |
return f"Failed to send email: {str(e)}"
|
| 44 |
|
|
|
|
|
|
|
|
|
|
| 45 |
tools = [Tool(name="Send Email", func=send_email, description="Sends an email. Args: to_email, subject, body")]
|
| 46 |
|
| 47 |
prompt = PromptTemplate.from_template(
|
|
|
|
| 42 |
except Exception as e:
|
| 43 |
return f"Failed to send email: {str(e)}"
|
| 44 |
|
| 45 |
+
# Create the agent after loading the model
|
| 46 |
+
agent = create_react_agent(local_llm, tools, prompt)
|
| 47 |
+
|
| 48 |
tools = [Tool(name="Send Email", func=send_email, description="Sends an email. Args: to_email, subject, body")]
|
| 49 |
|
| 50 |
prompt = PromptTemplate.from_template(
|