Skip to content

Commit 431f78c

Browse files
chore(core): merge regenerated v1.4 core SDK
2 parents 33109ad + db97a6a commit 431f78c

17 files changed

Lines changed: 276 additions & 76 deletions

reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ client.agent_management.agent_think(
10111011
<dl>
10121012
<dd>
10131013

1014-
**on_listening_action:** `typing.Optional[AgentThinkRequestOnListeningAction]`
1014+
**on_listening_action:** `typing.Optional[AgentThinkAgentManagementRequestOnListeningAction]`
10151015

10161016
The action to take when the agent is in a listening state:
10171017
- `inject`: Inject the custom text instruction into the current turn without interrupting it.
@@ -1023,7 +1023,7 @@ The action to take when the agent is in a listening state:
10231023
<dl>
10241024
<dd>
10251025

1026-
**on_thinking_action:** `typing.Optional[AgentThinkRequestOnThinkingAction]`
1026+
**on_thinking_action:** `typing.Optional[AgentThinkAgentManagementRequestOnThinkingAction]`
10271027

10281028
The action to take when the agent is in a thinking state:
10291029
- `interrupt`: Interrupt the current state and start a new conversation turn.
@@ -1035,7 +1035,7 @@ The action to take when the agent is in a thinking state:
10351035
<dl>
10361036
<dd>
10371037

1038-
**on_speaking_action:** `typing.Optional[AgentThinkRequestOnSpeakingAction]`
1038+
**on_speaking_action:** `typing.Optional[AgentThinkAgentManagementRequestOnSpeakingAction]`
10391039

10401040
The action to take when the agent is in a speaking state:
10411041
- `interrupt`: Interrupt the current state and start a new conversation turn.

src/agora_agent/agent_management/client.py

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
66
from ..core.request_options import RequestOptions
77
from .raw_client import AsyncRawAgentManagementClient, RawAgentManagementClient
8-
from .types.agent_think_request_on_listening_action import AgentThinkRequestOnListeningAction
9-
from .types.agent_think_request_on_speaking_action import AgentThinkRequestOnSpeakingAction
10-
from .types.agent_think_request_on_thinking_action import AgentThinkRequestOnThinkingAction
11-
from .types.agent_think_response import AgentThinkResponse
8+
from .types.agent_think_agent_management_request_on_listening_action import (
9+
AgentThinkAgentManagementRequestOnListeningAction,
10+
)
11+
from .types.agent_think_agent_management_request_on_speaking_action import (
12+
AgentThinkAgentManagementRequestOnSpeakingAction,
13+
)
14+
from .types.agent_think_agent_management_request_on_thinking_action import (
15+
AgentThinkAgentManagementRequestOnThinkingAction,
16+
)
17+
from .types.agent_think_agent_management_response import AgentThinkAgentManagementResponse
1218

1319
# this is used as the default value for optional parameters
1420
OMIT = typing.cast(typing.Any, ...)
@@ -35,13 +41,13 @@ def agent_think(
3541
agent_id: str,
3642
*,
3743
text: str,
38-
on_listening_action: typing.Optional[AgentThinkRequestOnListeningAction] = OMIT,
39-
on_thinking_action: typing.Optional[AgentThinkRequestOnThinkingAction] = OMIT,
40-
on_speaking_action: typing.Optional[AgentThinkRequestOnSpeakingAction] = OMIT,
44+
on_listening_action: typing.Optional[AgentThinkAgentManagementRequestOnListeningAction] = OMIT,
45+
on_thinking_action: typing.Optional[AgentThinkAgentManagementRequestOnThinkingAction] = OMIT,
46+
on_speaking_action: typing.Optional[AgentThinkAgentManagementRequestOnSpeakingAction] = OMIT,
4147
interruptable: typing.Optional[bool] = OMIT,
4248
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
4349
request_options: typing.Optional[RequestOptions] = None,
44-
) -> AgentThinkResponse:
50+
) -> AgentThinkAgentManagementResponse:
4551
"""
4652
Send a custom text instruction to the specified conversational AI agent instance.
4753
@@ -63,17 +69,17 @@ def agent_think(
6369
text : str
6470
The custom instruction text to inject into the current conversation pipeline. The system processes this as user input.
6571
66-
on_listening_action : typing.Optional[AgentThinkRequestOnListeningAction]
72+
on_listening_action : typing.Optional[AgentThinkAgentManagementRequestOnListeningAction]
6773
The action to take when the agent is in a listening state:
6874
- `inject`: Inject the custom text instruction into the current turn without interrupting it.
6975
- `ignore`: Ignore the request.
7076
71-
on_thinking_action : typing.Optional[AgentThinkRequestOnThinkingAction]
77+
on_thinking_action : typing.Optional[AgentThinkAgentManagementRequestOnThinkingAction]
7278
The action to take when the agent is in a thinking state:
7379
- `interrupt`: Interrupt the current state and start a new conversation turn.
7480
- `ignore`: Ignore the request.
7581
76-
on_speaking_action : typing.Optional[AgentThinkRequestOnSpeakingAction]
82+
on_speaking_action : typing.Optional[AgentThinkAgentManagementRequestOnSpeakingAction]
7783
The action to take when the agent is in a speaking state:
7884
- `interrupt`: Interrupt the current state and start a new conversation turn.
7985
- `ignore`: Ignore the request.
@@ -91,7 +97,7 @@ def agent_think(
9197
9298
Returns
9399
-------
94-
AgentThinkResponse
100+
AgentThinkAgentManagementResponse
95101
Request was successful. The response body contains the result of the request.
96102
97103
Examples
@@ -149,13 +155,13 @@ async def agent_think(
149155
agent_id: str,
150156
*,
151157
text: str,
152-
on_listening_action: typing.Optional[AgentThinkRequestOnListeningAction] = OMIT,
153-
on_thinking_action: typing.Optional[AgentThinkRequestOnThinkingAction] = OMIT,
154-
on_speaking_action: typing.Optional[AgentThinkRequestOnSpeakingAction] = OMIT,
158+
on_listening_action: typing.Optional[AgentThinkAgentManagementRequestOnListeningAction] = OMIT,
159+
on_thinking_action: typing.Optional[AgentThinkAgentManagementRequestOnThinkingAction] = OMIT,
160+
on_speaking_action: typing.Optional[AgentThinkAgentManagementRequestOnSpeakingAction] = OMIT,
155161
interruptable: typing.Optional[bool] = OMIT,
156162
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
157163
request_options: typing.Optional[RequestOptions] = None,
158-
) -> AgentThinkResponse:
164+
) -> AgentThinkAgentManagementResponse:
159165
"""
160166
Send a custom text instruction to the specified conversational AI agent instance.
161167
@@ -177,17 +183,17 @@ async def agent_think(
177183
text : str
178184
The custom instruction text to inject into the current conversation pipeline. The system processes this as user input.
179185
180-
on_listening_action : typing.Optional[AgentThinkRequestOnListeningAction]
186+
on_listening_action : typing.Optional[AgentThinkAgentManagementRequestOnListeningAction]
181187
The action to take when the agent is in a listening state:
182188
- `inject`: Inject the custom text instruction into the current turn without interrupting it.
183189
- `ignore`: Ignore the request.
184190
185-
on_thinking_action : typing.Optional[AgentThinkRequestOnThinkingAction]
191+
on_thinking_action : typing.Optional[AgentThinkAgentManagementRequestOnThinkingAction]
186192
The action to take when the agent is in a thinking state:
187193
- `interrupt`: Interrupt the current state and start a new conversation turn.
188194
- `ignore`: Ignore the request.
189195
190-
on_speaking_action : typing.Optional[AgentThinkRequestOnSpeakingAction]
196+
on_speaking_action : typing.Optional[AgentThinkAgentManagementRequestOnSpeakingAction]
191197
The action to take when the agent is in a speaking state:
192198
- `interrupt`: Interrupt the current state and start a new conversation turn.
193199
- `ignore`: Ignore the request.
@@ -205,7 +211,7 @@ async def agent_think(
205211
206212
Returns
207213
-------
208-
AgentThinkResponse
214+
AgentThinkAgentManagementResponse
209215
Request was successful. The response body contains the result of the request.
210216
211217
Examples

src/agora_agent/agent_management/raw_client.py

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
from ..core.jsonable_encoder import jsonable_encoder
1010
from ..core.request_options import RequestOptions
1111
from ..core.unchecked_base_model import construct_type
12-
from .types.agent_think_request_on_listening_action import AgentThinkRequestOnListeningAction
13-
from .types.agent_think_request_on_speaking_action import AgentThinkRequestOnSpeakingAction
14-
from .types.agent_think_request_on_thinking_action import AgentThinkRequestOnThinkingAction
15-
from .types.agent_think_response import AgentThinkResponse
12+
from .types.agent_think_agent_management_request_on_listening_action import (
13+
AgentThinkAgentManagementRequestOnListeningAction,
14+
)
15+
from .types.agent_think_agent_management_request_on_speaking_action import (
16+
AgentThinkAgentManagementRequestOnSpeakingAction,
17+
)
18+
from .types.agent_think_agent_management_request_on_thinking_action import (
19+
AgentThinkAgentManagementRequestOnThinkingAction,
20+
)
21+
from .types.agent_think_agent_management_response import AgentThinkAgentManagementResponse
1622

1723
# this is used as the default value for optional parameters
1824
OMIT = typing.cast(typing.Any, ...)
@@ -28,13 +34,13 @@ def agent_think(
2834
agent_id: str,
2935
*,
3036
text: str,
31-
on_listening_action: typing.Optional[AgentThinkRequestOnListeningAction] = OMIT,
32-
on_thinking_action: typing.Optional[AgentThinkRequestOnThinkingAction] = OMIT,
33-
on_speaking_action: typing.Optional[AgentThinkRequestOnSpeakingAction] = OMIT,
37+
on_listening_action: typing.Optional[AgentThinkAgentManagementRequestOnListeningAction] = OMIT,
38+
on_thinking_action: typing.Optional[AgentThinkAgentManagementRequestOnThinkingAction] = OMIT,
39+
on_speaking_action: typing.Optional[AgentThinkAgentManagementRequestOnSpeakingAction] = OMIT,
3440
interruptable: typing.Optional[bool] = OMIT,
3541
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
3642
request_options: typing.Optional[RequestOptions] = None,
37-
) -> HttpResponse[AgentThinkResponse]:
43+
) -> HttpResponse[AgentThinkAgentManagementResponse]:
3844
"""
3945
Send a custom text instruction to the specified conversational AI agent instance.
4046
@@ -56,17 +62,17 @@ def agent_think(
5662
text : str
5763
The custom instruction text to inject into the current conversation pipeline. The system processes this as user input.
5864
59-
on_listening_action : typing.Optional[AgentThinkRequestOnListeningAction]
65+
on_listening_action : typing.Optional[AgentThinkAgentManagementRequestOnListeningAction]
6066
The action to take when the agent is in a listening state:
6167
- `inject`: Inject the custom text instruction into the current turn without interrupting it.
6268
- `ignore`: Ignore the request.
6369
64-
on_thinking_action : typing.Optional[AgentThinkRequestOnThinkingAction]
70+
on_thinking_action : typing.Optional[AgentThinkAgentManagementRequestOnThinkingAction]
6571
The action to take when the agent is in a thinking state:
6672
- `interrupt`: Interrupt the current state and start a new conversation turn.
6773
- `ignore`: Ignore the request.
6874
69-
on_speaking_action : typing.Optional[AgentThinkRequestOnSpeakingAction]
75+
on_speaking_action : typing.Optional[AgentThinkAgentManagementRequestOnSpeakingAction]
7076
The action to take when the agent is in a speaking state:
7177
- `interrupt`: Interrupt the current state and start a new conversation turn.
7278
- `ignore`: Ignore the request.
@@ -84,7 +90,7 @@ def agent_think(
8490
8591
Returns
8692
-------
87-
HttpResponse[AgentThinkResponse]
93+
HttpResponse[AgentThinkAgentManagementResponse]
8894
Request was successful. The response body contains the result of the request.
8995
"""
9096
_response = self._client_wrapper.httpx_client.request(
@@ -107,9 +113,9 @@ def agent_think(
107113
try:
108114
if 200 <= _response.status_code < 300:
109115
_data = typing.cast(
110-
AgentThinkResponse,
116+
AgentThinkAgentManagementResponse,
111117
construct_type(
112-
type_=AgentThinkResponse, # type: ignore
118+
type_=AgentThinkAgentManagementResponse, # type: ignore
113119
object_=_response.json(),
114120
),
115121
)
@@ -130,13 +136,13 @@ async def agent_think(
130136
agent_id: str,
131137
*,
132138
text: str,
133-
on_listening_action: typing.Optional[AgentThinkRequestOnListeningAction] = OMIT,
134-
on_thinking_action: typing.Optional[AgentThinkRequestOnThinkingAction] = OMIT,
135-
on_speaking_action: typing.Optional[AgentThinkRequestOnSpeakingAction] = OMIT,
139+
on_listening_action: typing.Optional[AgentThinkAgentManagementRequestOnListeningAction] = OMIT,
140+
on_thinking_action: typing.Optional[AgentThinkAgentManagementRequestOnThinkingAction] = OMIT,
141+
on_speaking_action: typing.Optional[AgentThinkAgentManagementRequestOnSpeakingAction] = OMIT,
136142
interruptable: typing.Optional[bool] = OMIT,
137143
metadata: typing.Optional[typing.Dict[str, str]] = OMIT,
138144
request_options: typing.Optional[RequestOptions] = None,
139-
) -> AsyncHttpResponse[AgentThinkResponse]:
145+
) -> AsyncHttpResponse[AgentThinkAgentManagementResponse]:
140146
"""
141147
Send a custom text instruction to the specified conversational AI agent instance.
142148
@@ -158,17 +164,17 @@ async def agent_think(
158164
text : str
159165
The custom instruction text to inject into the current conversation pipeline. The system processes this as user input.
160166
161-
on_listening_action : typing.Optional[AgentThinkRequestOnListeningAction]
167+
on_listening_action : typing.Optional[AgentThinkAgentManagementRequestOnListeningAction]
162168
The action to take when the agent is in a listening state:
163169
- `inject`: Inject the custom text instruction into the current turn without interrupting it.
164170
- `ignore`: Ignore the request.
165171
166-
on_thinking_action : typing.Optional[AgentThinkRequestOnThinkingAction]
172+
on_thinking_action : typing.Optional[AgentThinkAgentManagementRequestOnThinkingAction]
167173
The action to take when the agent is in a thinking state:
168174
- `interrupt`: Interrupt the current state and start a new conversation turn.
169175
- `ignore`: Ignore the request.
170176
171-
on_speaking_action : typing.Optional[AgentThinkRequestOnSpeakingAction]
177+
on_speaking_action : typing.Optional[AgentThinkAgentManagementRequestOnSpeakingAction]
172178
The action to take when the agent is in a speaking state:
173179
- `interrupt`: Interrupt the current state and start a new conversation turn.
174180
- `ignore`: Ignore the request.
@@ -186,7 +192,7 @@ async def agent_think(
186192
187193
Returns
188194
-------
189-
AsyncHttpResponse[AgentThinkResponse]
195+
AsyncHttpResponse[AgentThinkAgentManagementResponse]
190196
Request was successful. The response body contains the result of the request.
191197
"""
192198
_response = await self._client_wrapper.httpx_client.request(
@@ -209,9 +215,9 @@ async def agent_think(
209215
try:
210216
if 200 <= _response.status_code < 300:
211217
_data = typing.cast(
212-
AgentThinkResponse,
218+
AgentThinkAgentManagementResponse,
213219
construct_type(
214-
type_=AgentThinkResponse, # type: ignore
220+
type_=AgentThinkAgentManagementResponse, # type: ignore
215221
object_=_response.json(),
216222
),
217223
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
AgentThinkAgentManagementRequestOnListeningAction = typing.Union[typing.Literal["inject", "ignore"], typing.Any]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
AgentThinkAgentManagementRequestOnSpeakingAction = typing.Union[typing.Literal["interrupt", "ignore"], typing.Any]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
AgentThinkAgentManagementRequestOnThinkingAction = typing.Union[typing.Literal["interrupt", "ignore"], typing.Any]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
import pydantic
6+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
7+
from ...core.unchecked_base_model import UncheckedBaseModel
8+
9+
10+
class AgentThinkAgentManagementResponse(UncheckedBaseModel):
11+
agent_id: typing.Optional[str] = pydantic.Field(default=None)
12+
"""
13+
Unique identifier of the agent instance.
14+
"""
15+
16+
channel: typing.Optional[str] = pydantic.Field(default=None)
17+
"""
18+
The name of the RTC channel where the agent is located.
19+
"""
20+
21+
start_ts: typing.Optional[int] = pydantic.Field(default=None)
22+
"""
23+
Timestamp indicating when the agent was created.
24+
"""
25+
26+
if IS_PYDANTIC_V2:
27+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28+
else:
29+
30+
class Config:
31+
frozen = True
32+
smart_union = True
33+
extra = pydantic.Extra.allow

src/agora_agent/agentkit/__init__.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,17 @@
4242
McpServersItem,
4343
)
4444
from .agent_session import AgentSession, AgentSessionOptions, AsyncAgentSession
45-
from ..agent_management.types.agent_think_response import AgentThinkResponse
46-
from ..agent_management.types.agent_think_request_on_listening_action import (
47-
AgentThinkRequestOnListeningAction,
45+
from ..agent_management.types.agent_think_agent_management_response import (
46+
AgentThinkAgentManagementResponse as AgentThinkResponse,
4847
)
49-
from ..agent_management.types.agent_think_request_on_thinking_action import (
50-
AgentThinkRequestOnThinkingAction,
48+
from ..agent_management.types.agent_think_agent_management_request_on_listening_action import (
49+
AgentThinkAgentManagementRequestOnListeningAction as AgentThinkRequestOnListeningAction,
5150
)
52-
from ..agent_management.types.agent_think_request_on_speaking_action import (
53-
AgentThinkRequestOnSpeakingAction,
51+
from ..agent_management.types.agent_think_agent_management_request_on_thinking_action import (
52+
AgentThinkAgentManagementRequestOnThinkingAction as AgentThinkRequestOnThinkingAction,
53+
)
54+
from ..agent_management.types.agent_think_agent_management_request_on_speaking_action import (
55+
AgentThinkAgentManagementRequestOnSpeakingAction as AgentThinkRequestOnSpeakingAction,
5456
)
5557
from .avatar_types import (
5658
is_akool_avatar,

src/agora_agent/agentkit/agent_session.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
import warnings
33

44
from ..core.api_error import ApiError
5-
from ..agent_management.types.agent_think_request_on_listening_action import (
6-
AgentThinkRequestOnListeningAction,
5+
from ..agent_management.types.agent_think_agent_management_request_on_listening_action import (
6+
AgentThinkAgentManagementRequestOnListeningAction as AgentThinkRequestOnListeningAction,
77
)
8-
from ..agent_management.types.agent_think_request_on_speaking_action import (
9-
AgentThinkRequestOnSpeakingAction,
8+
from ..agent_management.types.agent_think_agent_management_request_on_speaking_action import (
9+
AgentThinkAgentManagementRequestOnSpeakingAction as AgentThinkRequestOnSpeakingAction,
1010
)
11-
from ..agent_management.types.agent_think_request_on_thinking_action import (
12-
AgentThinkRequestOnThinkingAction,
11+
from ..agent_management.types.agent_think_agent_management_request_on_thinking_action import (
12+
AgentThinkAgentManagementRequestOnThinkingAction as AgentThinkRequestOnThinkingAction,
13+
)
14+
from ..agent_management.types.agent_think_agent_management_response import (
15+
AgentThinkAgentManagementResponse as AgentThinkResponse,
1316
)
14-
from ..agent_management.types.agent_think_response import AgentThinkResponse
1517
from ..agents.types.start_agents_request_properties import StartAgentsRequestProperties
1618
from .agent import Agent
1719
from .avatar_types import (

0 commit comments

Comments
 (0)