Skip to content

Commit

Permalink
add missing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Jan 13, 2025
1 parent b126f7b commit b56f2aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agixt/Agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ def add_agent(agent_name, provider_settings=None, commands=None, user=DEFAULT_US
token = impersonate_user(user_id=str(user_id))
auth = MagicalAuth(token=token)
provider_settings["company_id"] = str(auth.company_id)
# Iterate over DEFAULT_SETTINGS and add any missing keys
for key in DEFAULT_SETTINGS:
if key not in provider_settings:
provider_settings[key] = DEFAULT_SETTINGS[key]
if commands is None or commands == "" or commands == {}:
commands = {}
# Get provider ID based on provider name from provider_settings["provider"]
Expand Down

0 comments on commit b56f2aa

Please sign in to comment.