Skip to content

Commit cd8820a

Browse files
authored
Removes example setting annotations with Agent class (#1156)
* removes annotation example * pre-commit
1 parent d085b02 commit cd8820a

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

synapseclient/models/agent.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,8 @@ async def prompt_async(
826826
`Synapse.allow_client_caching(False)` this will use the last created
827827
instance from the Synapse class constructor.
828828
829-
Example: Prompt the baseline Synapse Agent to add annotations to a file on Synapse
830-
The baseline Synpase Agent can be used to add annotations to files.
829+
Example: Prompt the baseline Synapse Agent.
830+
The baseline Synapse Agent is equivilent to the Agent available in the Synapse UI.
831831
832832
import asyncio
833833
from synapseclient import Synapse
@@ -838,11 +838,8 @@ async def prompt_async(
838838
839839
async def main():
840840
my_agent = Agent()
841-
await my_agent.start_session_async(
842-
access_level=AgentSessionAccessLevel.WRITE_YOUR_PRIVATE_DATA
843-
)
844841
await my_agent.prompt_async(
845-
prompt="Add the annotation 'test' to the file 'syn123456789'",
842+
prompt="Can you tell me about the AD Knowledge Portal dataset?",
846843
enable_trace=True,
847844
print_response=True,
848845
)

synapseclient/models/protocols/agent_protocol.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -328,21 +328,18 @@ def prompt(
328328
`Synapse.allow_client_caching(False)` this will use the last created
329329
instance from the Synapse class constructor.
330330
331-
Example: Prompt the baseline Synapse Agent to add annotations to a file on Synapse
332-
The baseline Synpase Agent can be used to add annotations to files.
331+
Example: Prompt the baseline Synapse Agent.
332+
The baseline Synapse Agent is equivilent to the Agent available in the Synapse UI.
333333
334334
from synapseclient import Synapse
335-
from synapseclient.models import Agent, AgentSessionAccessLevel
335+
from synapseclient.models import Agent
336336
337337
syn = Synapse()
338338
syn.login()
339339
340340
my_agent = Agent()
341-
my_agent.start_session(
342-
access_level=AgentSessionAccessLevel.WRITE_YOUR_PRIVATE_DATA
343-
)
344341
my_agent.prompt(
345-
prompt="Add the annotation 'test' to the file 'syn123456789'",
342+
prompt="Can you tell me about the AD Knowledge Portal dataset?",
346343
enable_trace=True,
347344
print_response=True,
348345
)

0 commit comments

Comments
 (0)