Skip to content

Commit

Permalink
Removes example setting annotations with Agent class (#1156)
Browse files Browse the repository at this point in the history
* removes annotation example

* pre-commit
  • Loading branch information
BWMac authored Jan 29, 2025
1 parent d085b02 commit cd8820a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
9 changes: 3 additions & 6 deletions synapseclient/models/agent.py
Original file line number Diff line number Diff line change
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 cd8820a

Please sign in to comment.