|
6 | 6 | from synapseclient import Synapse |
7 | 7 |
|
8 | 8 | if TYPE_CHECKING: |
9 | | - from synapseclient.models import Agent, AgentSession, AgentSessionAccessLevel |
| 9 | + from synapseclient.models import ( |
| 10 | + Agent, |
| 11 | + AgentPrompt, |
| 12 | + AgentSession, |
| 13 | + AgentSessionAccessLevel, |
| 14 | + ) |
10 | 15 |
|
11 | 16 |
|
12 | 17 | class AgentSessionSynchronousProtocol(Protocol): |
@@ -109,7 +114,7 @@ def prompt( |
109 | 114 | newer_than: Optional[int] = None, |
110 | 115 | *, |
111 | 116 | synapse_client: Optional[Synapse] = None, |
112 | | - ) -> None: |
| 117 | + ) -> "AgentPrompt": |
113 | 118 | """Sends a prompt to the agent and adds the response to the AgentSession's |
114 | 119 | chat history. A session must be started before sending a prompt. |
115 | 120 |
|
@@ -140,7 +145,7 @@ def prompt( |
140 | 145 | print_response=True, |
141 | 146 | ) |
142 | 147 | """ |
143 | | - return None |
| 148 | + return AgentPrompt() |
144 | 149 |
|
145 | 150 |
|
146 | 151 | class AgentSynchronousProtocol(Protocol): |
@@ -313,7 +318,7 @@ def prompt( |
313 | 318 | newer_than: Optional[int] = None, |
314 | 319 | *, |
315 | 320 | synapse_client: Optional[Synapse] = None, |
316 | | - ) -> None: |
| 321 | + ) -> "AgentPrompt": |
317 | 322 | """Sends a prompt to the agent for the current session. |
318 | 323 | If no session is currently active, a new session will be started. |
319 | 324 |
|
@@ -388,4 +393,4 @@ def prompt( |
388 | 393 | session=my_second_session, |
389 | 394 | ) |
390 | 395 | """ |
391 | | - return None |
| 396 | + return AgentPrompt() |
0 commit comments