added URL to payload for each agent
This commit is contained in:
parent
055c744862
commit
7d74ede2ab
1 changed files with 8 additions and 0 deletions
|
|
@ -145,6 +145,12 @@ def build_payload(agent: Dict[str, Any]) -> Dict[str, Any]:
|
|||
usage_timeline = agent.get("usage_timeline", [])
|
||||
usage_summary = agent.get("usage_summary", {})
|
||||
|
||||
# Construct agent URL for LibreChat
|
||||
agent_url = None
|
||||
agent_id = agent.get("id")
|
||||
if agent_id:
|
||||
agent_url = f"https://chat-sandbox.oliver.solutions/c/new?agent_id={agent_id}"
|
||||
|
||||
payload: Dict[str, Any] = {
|
||||
"name": name,
|
||||
"description": description,
|
||||
|
|
@ -159,6 +165,8 @@ def build_payload(agent: Dict[str, Any]) -> Dict[str, Any]:
|
|||
"contact_person": contact_person,
|
||||
"tags": tags or None,
|
||||
"metadata": metadata or None,
|
||||
# Agent URL:
|
||||
"url": agent_url,
|
||||
# Usage data:
|
||||
"usage_timeline": usage_timeline or None,
|
||||
"conversation_count": usage_summary.get("conversation_count", 0),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue