Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
BWMac committed Jan 17, 2025
1 parent 0082ea6 commit 6adde6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion synapseclient/models/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ async def prompt_async(
synapse_client: Optional[Synapse] = None,
) -> None:
"""Sends a prompt to the agent and adds the response to the AgentSession's chat history.
A session must be started before sending a prompt.
Arguments:
prompt: The prompt to send to the agent.
Expand Down Expand Up @@ -368,7 +369,7 @@ class Agent(AgentSynchronousProtocol):
syn = Synapse()
syn.login()
my_agent = Agent().start_session(synapse_client=syn)
my_agent = Agent()
my_agent.prompt(
prompt="Can you tell me about the AD Knowledge Portal dataset?",
enable_trace=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from synapseclient import Synapse
from synapseclient.models.agent import Agent, AgentSession, AgentSessionAccessLevel

AGENT_AWS_ID = "QOTV3KQM1X"
AGENT_REGISTRATION_ID = "29"
CLOUD_AGENT_ID = "QOTV3KQM1X"
AGENT_REGISTRATION_ID = 29


class TestAgentSession:
Expand All @@ -32,7 +32,7 @@ def test_start(self) -> None:
assert result_session.started_on is not None
assert result_session.started_by is not None
assert result_session.modified_on is not None
assert result_session.agent_registration_id == AGENT_REGISTRATION_ID
assert result_session.agent_registration_id == str(AGENT_REGISTRATION_ID)
assert result_session.etag is not None
assert result_session.chat_history == []

Expand Down Expand Up @@ -98,7 +98,7 @@ def init(self, syn: Synapse) -> None:

def test_register(self) -> None:
# GIVEN an Agent with a valid agent AWS id
agent = Agent(cloud_agent_id=AGENT_AWS_ID)
agent = Agent(cloud_agent_id=CLOUD_AGENT_ID)
# WHEN I register the agent
agent.register(synapse_client=self.syn)
# THEN I expect the agent to be registered
Expand Down

0 comments on commit 6adde6a

Please sign in to comment.