-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsign_up_agent.py
30 lines (22 loc) · 876 Bytes
/
sign_up_agent.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from langchain_core.tools import tool
def sign_up_tool(return_route:str):
@tool(parse_docstring=True, response_format="content_and_artifact")
def tool_func(first_name: str, last_name: str, email: str):
"""Saves user first and last name.
Args:
first_name : user first name
last_name : user last name
email : user email
"""
print("CREATING USER" , first_name, last_name, email)
return "User signed up. Verification email is sent", {
'current_route': return_route,
'first_name': first_name,
'last_name': last_name,
'email': email
}
return tool_func
sign_up_prompt = f"""
You are the assistant that signs up a user.
You need to collect user name, last name, and email and save it using tools
"""