Skip to content

Commit

Permalink
removes annotation example
Browse files Browse the repository at this point in the history
  • Loading branch information
BWMac committed Jan 29, 2025
1 parent d085b02 commit 7d39ee4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
15 changes: 6 additions & 9 deletions synapseclient/models/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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,
)
Expand Down
11 changes: 4 additions & 7 deletions synapseclient/models/protocols/agent_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down

0 comments on commit 7d39ee4

Please sign in to comment.