aboutsummaryrefslogtreecommitdiff
path: root/tools/get_user_inputs.py
diff options
context:
space:
mode:
authorGregory Sinnott <gnsinnott@gmail.com>2023-10-14 04:33:34 -0600
committerGregory Sinnott <gnsinnott@gmail.com>2023-10-14 04:33:34 -0600
commit5856edfb295bc3d4348398912da66824986dda09 (patch)
tree0318635e8dfe19c27297dd2264e9b42099ec9e8a /tools/get_user_inputs.py
parent1808d25fea07c51e251941ef414f396ef8c95c27 (diff)
User inputs and call criteria changes
Diffstat (limited to 'tools/get_user_inputs.py')
-rw-r--r--tools/get_user_inputs.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/get_user_inputs.py b/tools/get_user_inputs.py
new file mode 100644
index 0000000..3b59a3a
--- /dev/null
+++ b/tools/get_user_inputs.py
@@ -0,0 +1,37 @@
+from typing import List
+from langchain.agents import tool
+
+from dotenv import load_dotenv
+
+from langchain.agents import load_tools
+from langchain.llms import OpenAI
+from langchain.agents import initialize_agent, AgentType
+
+load_dotenv()
+
+import os
+
+INPUTS = {}
+
+
+@tool("get_desired_inputs")
+def get_desired_inputs(input: str) -> dict:
+ """
+ You will be given a task that will be performed by an autonomous agent on behalf of a user. You will gather any necessary data from the user to complete the specified task before executing the task.
+ """
+
+ prompt = input
+
+ llm = OpenAI(temperature=0)
+ agent = initialize_agent(
+ tools=load_tools(["human"]),
+ llm=llm,
+ agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
+ )
+
+ return agent.run(prompt)
+
+
+def get_user_inputs():
+ # iterate through INPUTS and populate values
+ print("Done")