Skip to content

Commit

Permalink
add ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Jan 14, 2025
1 parent d77123c commit 5020ee7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agixt/Agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,11 @@ def get_agent_config(self):
if value == "":
continue
config["settings"][key] = value
else:
company_id = self.auth.company_id
self.update_agent_config(
new_config={"company_id": company_id}, config_key="settings"
)
return config

async def inference(
Expand Down
9 changes: 9 additions & 0 deletions agixt/MagicalAuth.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,15 @@ def get_agents(email, company=None):
if company_id and company:
if company_id != company:
continue
if not company_id:
auth = MagicalAuth(token=impersonate_user(email))
company_id = auth.company_id
# add to agent settings
agent_setting = AgentSettingModel(
agent_id=agent.id, name="company_id", value=company_id
)
session.add(agent_setting)
session.commit()
output.append(
{
"name": agent.name,
Expand Down

0 comments on commit 5020ee7

Please sign in to comment.