Skip to content

Commit

Permalink
Copy logic from GQL to REST;
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesonRGrieve committed Feb 6, 2025
1 parent 237c5d5 commit 2a7faad
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions agixt/endpoints/Agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,11 @@ async def get_agentconfig(
agent_name=agent_name, user=user, ApiClient=ApiClient
).get_agent_config()
for key, value in agent_config["settings"].items():
upper_key = str(key).upper()
if (
upper_key.endswith("_KEY")
or upper_key.endswith("_PASSWORD")
or upper_key.endswith("_SECRET")
or upper_key.endswith("_TOKEN")
):
agent_config["settings"][key] = "HIDDEN"
if value != "":
if any(x in key.upper() for x in ["KEY", "SECRET", "PASSWORD"]):
agent_config["settings"][key] = "HIDDEN"
else:
agent_config["settings"][key] = value
return {"agent": agent_config}


Expand Down

0 comments on commit 2a7faad

Please sign in to comment.