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

Edit agent feature 1 #998

Merged

Conversation

rounak610
Copy link
Collaborator

Description

Changes in 7 files:
controllers/agent.py -> removed the fetch details api and i have moved it to the controllers/agent_execution_config.py file
and in the create_agent_with_config function i have added new agent_execution_configs
models/agent_config.py -> added a update_agent_configurations_table function which updates the "agent_configurations" table
whenever we run edit agent
controllers/agent_execution_config.py -> added a new api call(get_agent_execution_configuration) , which is used by frontend to fetch the details of the execution/ run
controllers/ agent_execution.py -> added a new api call(create_agent_run), which is used to create a new execution/ run
controllers/ type/ agent_execution_config.py -> created this new file which contains the AgentRunIn class, this class is used to update the "agent_configurations" table and to create a new execution
models/agent.py -> using this code for extracting value:
list(ast.literal_eval(value))
because the array containing the tools_id is received in the form of a string

Related Issues

Solution and Design

Test Plan

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update

Checklist

  • My pull request is atomic and focuses on a single change.
  • I have read the contributing guide and my code conforms to the guidelines.
  • I have documented my changes clearly and comprehensively.
  • I have added the required tests.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Rounak Bhatia seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

# Fetch agent configurations
agent_configs = session.query(AgentConfiguration).filter(AgentConfiguration.agent_id == agent_id).all()
for agent_config in agent_configs:
key = agent_config.key
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove key var u can directly us eit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed key variable

@@ -100,3 +106,46 @@ def eval_agent_config(cls, key, value):

if key == "goal" or key == "instruction":
return eval(value)

@classmethod
def fetch_details_api(cls, session, agent, results_agent, results_agent_execution, total_calls, total_tokens):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build_agent_execution_config

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Patch coverage: 57.14% and project coverage change: +0.04% 🎉

Comparison is base (3266d8c) 59.41% compared to head (989ce4c) 59.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #998      +/-   ##
==========================================
+ Coverage   59.41%   59.46%   +0.04%     
==========================================
  Files         197      198       +1     
  Lines        8723     8844     +121     
  Branches      908      927      +19     
==========================================
+ Hits         5183     5259      +76     
- Misses       3316     3343      +27     
- Partials      224      242      +18     
Files Changed Coverage Δ
superagi/controllers/agent_execution.py 49.36% <20.58%> (-8.57%) ⬇️
superagi/controllers/agent.py 56.45% <42.85%> (+4.72%) ⬆️
superagi/models/agent_execution_config.py 61.42% <45.94%> (-17.36%) ⬇️
superagi/models/agent_config.py 62.00% <63.63%> (+3.37%) ⬆️
superagi/controllers/agent_execution_config.py 75.60% <66.66%> (-20.05%) ⬇️
...peragi/controllers/types/agent_execution_config.py 100.00% <100.00%> (ø)
superagi/models/agent.py 55.91% <100.00%> (+1.56%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TransformerOptimus TransformerOptimus merged commit 6c9afdd into TransformerOptimus:dev Aug 7, 2023
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants