forked from akshata29/entaoai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogpt_easy_start.py
30 lines (27 loc) · 974 Bytes
/
autogpt_easy_start.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 typing import Union
from promptflow import tool
from promptflow.connections import AzureOpenAIConnection, OpenAIConnection
@tool
def autogpt_easy_start(connection: Union[AzureOpenAIConnection, OpenAIConnection], system_prompt: str, user_prompt: str,
triggering_prompt: str, functions: list, model_or_deployment_name: str):
from wiki_search import search
from python_repl import python
from autogpt_class import AutoGPT
from vector_retriever import searchPinecone
full_message_history = []
tools = [
searchPinecone,
python
]
agent = AutoGPT(
full_message_history=full_message_history,
tools=tools,
system_prompt=system_prompt,
connection=connection,
model_or_deployment_name=model_or_deployment_name,
functions=functions,
user_prompt=user_prompt,
triggering_prompt=triggering_prompt
)
result = agent.run()
return result