Skip to content

Commit

Permalink
add task planning
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Jun 12, 2024
1 parent f144387 commit be2af71
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions agixtsdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,3 +1260,32 @@ async def chat_completions(
},
}
return res_model

def plan_task(
self,
agent_name: str,
user_input: str,
websearch: bool = False,
websearch_depth: int = 3,
conversation_name: str = "",
log_user_input: bool = True,
log_output: bool = True,
enable_new_command: bool = True,
):
try:
response = requests.post(
headers=self.headers,
url=f"{self.base_uri}/api/agent/{agent_name}/plan/task",
json={
"user_input": user_input,
"websearch": websearch,
"websearch_depth": websearch_depth,
"conversation_name": conversation_name,
"log_user_input": log_user_input,
"log_output": log_output,
"enable_new_command": enable_new_command,
},
)
return response.json()["response"]
except Exception as e:
return self.handle_error(e)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="agixtsdk",
version="0.0.46",
version="0.0.47",
description="The AGiXT SDK for Python.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit be2af71

Please sign in to comment.