diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2023-10-13 23:50:10 -0600 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2023-10-13 23:50:10 -0600 |
commit | 9f914f8d479d58d7ccc045784fe614dfea9a1219 (patch) | |
tree | db5a58ae9bdae7a7aa139c6220e048c359657298 /tools/contacts.py | |
parent | 6edba6384b42fa03785ac5887e91eb310e876ced (diff) |
langchain
Diffstat (limited to 'tools/contacts.py')
-rw-r--r-- | tools/contacts.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/contacts.py b/tools/contacts.py new file mode 100644 index 0000000..4f4a3be --- /dev/null +++ b/tools/contacts.py @@ -0,0 +1,19 @@ +from typing import List +from langchain.agents import tool + +from dotenv import load_dotenv +load_dotenv() + +import os + +CONTACTS = [ + { + "name": "Greg", + "phone" : os.getenv("TEST_PHONE_NUMBER") + } +] + +@tool("get_all_contacts") +def get_all_contacts(placeholder: str) -> List[dict]: + """Returns all contacts in the user's phone book.""" + return CONTACTS
\ No newline at end of file |