From 7d39ee4cff6252321acc32b4bcf3ae1b694efcfb Mon Sep 17 00:00:00 2001 From: bwmac Date: Wed, 29 Jan 2025 09:00:22 -0500 Subject: [PATCH] removes annotation example --- synapseclient/models/agent.py | 15 ++++++--------- synapseclient/models/protocols/agent_protocol.py | 11 ++++------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/synapseclient/models/agent.py b/synapseclient/models/agent.py index 18d737e0d..12e5d1e13 100644 --- a/synapseclient/models/agent.py +++ b/synapseclient/models/agent.py @@ -199,9 +199,9 @@ class AgentSession(AgentSessionSynchronousProtocol): """The unique ID of the agent session. Can only be used by the user that created it.""" - access_level: Optional[ - AgentSessionAccessLevel - ] = AgentSessionAccessLevel.PUBLICLY_ACCESSIBLE + access_level: Optional[AgentSessionAccessLevel] = ( + AgentSessionAccessLevel.PUBLICLY_ACCESSIBLE + ) """The access level of the agent session. One of PUBLICLY_ACCESSIBLE, READ_YOUR_PRIVATE_DATA, or WRITE_YOUR_PRIVATE_DATA. Defaults to PUBLICLY_ACCESSIBLE. @@ -826,8 +826,8 @@ async def prompt_async( `Synapse.allow_client_caching(False)` this will use the last created instance from the Synapse class constructor. - Example: Prompt the baseline Synapse Agent to add annotations to a file on Synapse - The baseline Synpase Agent can be used to add annotations to files. + Example: Prompt the baseline Synapse Agent. + The baseline Synapse Agent is equivilent to the Agent available in the Synapse UI. import asyncio from synapseclient import Synapse @@ -838,11 +838,8 @@ async def prompt_async( async def main(): my_agent = Agent() - await my_agent.start_session_async( - access_level=AgentSessionAccessLevel.WRITE_YOUR_PRIVATE_DATA - ) await my_agent.prompt_async( - prompt="Add the annotation 'test' to the file 'syn123456789'", + prompt="Can you tell me about the AD Knowledge Portal dataset?", enable_trace=True, print_response=True, ) diff --git a/synapseclient/models/protocols/agent_protocol.py b/synapseclient/models/protocols/agent_protocol.py index 19df5e0ab..e6b05fac7 100644 --- a/synapseclient/models/protocols/agent_protocol.py +++ b/synapseclient/models/protocols/agent_protocol.py @@ -328,21 +328,18 @@ def prompt( `Synapse.allow_client_caching(False)` this will use the last created instance from the Synapse class constructor. - Example: Prompt the baseline Synapse Agent to add annotations to a file on Synapse - The baseline Synpase Agent can be used to add annotations to files. + Example: Prompt the baseline Synapse Agent. + The baseline Synapse Agent is equivilent to the Agent available in the Synapse UI. from synapseclient import Synapse - from synapseclient.models import Agent, AgentSessionAccessLevel + from synapseclient.models import Agent syn = Synapse() syn.login() my_agent = Agent() - my_agent.start_session( - access_level=AgentSessionAccessLevel.WRITE_YOUR_PRIVATE_DATA - ) my_agent.prompt( - prompt="Add the annotation 'test' to the file 'syn123456789'", + prompt="Can you tell me about the AD Knowledge Portal dataset?", enable_trace=True, print_response=True, )