Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for webhooks #1181

Merged
merged 40 commits into from
Sep 4, 2023
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4e62d61
fix
rounak610 Aug 11, 2023
97cbc07
webhooks frontend + api calls complete almost
namansleeps2 Aug 21, 2023
ee53fd0
Merge remote-tracking branch 'origin/dev' into dev
rounak610 Aug 22, 2023
1b1a12e
webhooks compplete frontend
namansleeps2 Aug 23, 2023
8655121
Merge branch 'dev' of https://github.com/TransformerOptimus/SuperAGI …
rounak610 Aug 28, 2023
9f52ebd
Merge branch 'dev' of https://github.com/TransformerOptimus/SuperAGI …
rounak610 Aug 28, 2023
3d180f3
added filters in the webhooks
rounak610 Aug 28, 2023
898d40f
fix
rounak610 Aug 28, 2023
5d63f8f
added filters in the webhooks
rounak610 Aug 28, 2023
dc84435
Merge branch 'dev' of github.com:TransformerOptimus/SuperAGI into web…
namansleeps2 Aug 29, 2023
8eb134e
added filters in the webhooks
rounak610 Aug 29, 2023
7d90ea0
Merge branch 'webhook_dev' into webhooks_new
rounak610 Aug 29, 2023
68bf955
adding of filters table and edit functionality is on the way
namansleeps2 Aug 29, 2023
d00124d
Merge remote-tracking branch 'origin/webhooks_new' into webhooks_new
namansleeps2 Aug 29, 2023
4ef811b
added filters in webhooks
rounak610 Aug 30, 2023
41180c8
Merge branch 'webhooks_new' of https://github.com/TransformerOptimus/…
rounak610 Aug 30, 2023
df718e5
added filters in webhooks
rounak610 Aug 30, 2023
1ca7e3e
minor changes
namansleeps2 Aug 30, 2023
6c0dca4
Merge branch 'webhooks_new' of github.com:TransformerOptimus/SuperAGI…
namansleeps2 Aug 30, 2023
0e15c68
webhooks complete
namansleeps2 Aug 30, 2023
ab37d67
minor changes for PR
namansleeps2 Aug 30, 2023
5c14715
minor changes for PR
namansleeps2 Aug 30, 2023
1dd9611
added filters in webhooks
rounak610 Aug 30, 2023
a382161
Merge branch 'webhooks_new' of https://github.com/TransformerOptimus/…
rounak610 Aug 30, 2023
576f31d
resolving conflicts
namansleeps2 Aug 30, 2023
5f50b66
added filters in webhooks
rounak610 Aug 30, 2023
7a29b3e
Merge branch 'webhooks_new' of https://github.com/TransformerOptimus/…
rounak610 Aug 30, 2023
eb48d88
resolving conflicts
namansleeps2 Aug 30, 2023
0ed457f
Merge remote-tracking branch 'origin/webhooks_new' into webhooks_new
namansleeps2 Aug 30, 2023
f0659e5
added filters in the webhooks
rounak610 Aug 31, 2023
7e15b6e
bug fix of prev PR
namansleeps2 Aug 31, 2023
d069216
Merge remote-tracking branch 'origin/webhooks_new' into webhooks_new
namansleeps2 Aug 31, 2023
d741fa8
added filters in webhooks
rounak610 Aug 31, 2023
62dd221
Merge branch 'webhooks_new' of https://github.com/TransformerOptimus/…
rounak610 Aug 31, 2023
1f5e6d5
added filters in the webhooks
rounak610 Aug 31, 2023
a56dbe6
added filters in the webhooks
rounak610 Aug 31, 2023
7a08bd6
Update conftest.py
Fluder-Paradyne Aug 31, 2023
73a657c
fixes related to webhooks
rounak610 Sep 2, 2023
0d4728c
Merge branch 'dev' of https://github.com/TransformerOptimus/SuperAGI …
rounak610 Sep 2, 2023
e24feb0
fixes for webhooks
rounak610 Sep 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions superagi/controllers/agent_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@
iteration_step_id = IterationWorkflow.fetch_trigger_step_id(db.session,
start_step.action_reference_id).id if start_step.action_type == "ITERATION_WORKFLOW" else -1

db_agent_execution = AgentExecution(status="RUNNING", last_execution_time=datetime.now(),
db_agent_execution = AgentExecution(status="CREATED", last_execution_time=datetime.now(),

Check warning on line 90 in superagi/controllers/agent_execution.py

View check run for this annotation

Codecov / codecov/patch

superagi/controllers/agent_execution.py#L90

Added line #L90 was not covered by tests
agent_id=agent_execution.agent_id, name=agent_execution.name, num_of_calls=0,
num_of_tokens=0,
current_agent_step_id=start_step.id,
iteration_workflow_step_id=iteration_step_id)

agent_execution_configs = {
"goal": agent_execution.goal,
"instruction": agent_execution.instruction
Expand All @@ -119,6 +119,11 @@
db.session.add(db_agent_execution)
db.session.commit()
db.session.flush()

#update status from CREATED to RUNNING
db_agent_execution.status = "RUNNING"
db.session.commit()

Check warning on line 125 in superagi/controllers/agent_execution.py

View check run for this annotation

Codecov / codecov/patch

superagi/controllers/agent_execution.py#L124-L125

Added lines #L124 - L125 were not covered by tests

AgentExecutionConfiguration.add_or_update_agent_execution_config(session=db.session, execution=db_agent_execution,
agent_execution_configs=agent_execution_configs)

Expand Down Expand Up @@ -171,7 +176,7 @@
iteration_step_id = IterationWorkflow.fetch_trigger_step_id(db.session,
start_step.action_reference_id).id if start_step.action_type == "ITERATION_WORKFLOW" else -1

db_agent_execution = AgentExecution(status="RUNNING", last_execution_time=datetime.now(),
db_agent_execution = AgentExecution(status="CREATED", last_execution_time=datetime.now(),

Check warning on line 179 in superagi/controllers/agent_execution.py

View check run for this annotation

Codecov / codecov/patch

superagi/controllers/agent_execution.py#L179

Added line #L179 was not covered by tests
agent_id=agent_execution.agent_id, name=agent_execution.name, num_of_calls=0,
num_of_tokens=0,
current_agent_step_id=start_step.id,
Expand All @@ -195,6 +200,10 @@
db.session.add(db_agent_execution)
db.session.commit()
db.session.flush()

#update status from CREATED to RUNNING
db_agent_execution.status = "RUNNING"
db.session.commit()

Check warning on line 206 in superagi/controllers/agent_execution.py

View check run for this annotation

Codecov / codecov/patch

superagi/controllers/agent_execution.py#L205-L206

Added lines #L205 - L206 were not covered by tests

AgentExecutionConfiguration.add_or_update_agent_execution_config(session = db.session, execution = db_agent_execution,
agent_execution_configs = agent_execution_configs)
Expand Down