openai-agents 0.2.10__py3-none-any.whl → 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of openai-agents might be problematic. Click here for more details.
- agents/_debug.py +15 -4
- agents/_run_impl.py +34 -37
- agents/extensions/models/litellm_model.py +20 -5
- agents/memory/__init__.py +2 -0
- agents/memory/openai_conversations_session.py +0 -3
- agents/memory/util.py +20 -0
- agents/models/openai_chatcompletions.py +17 -2
- agents/models/openai_responses.py +17 -4
- agents/realtime/_util.py +1 -1
- agents/realtime/agent.py +7 -0
- agents/realtime/audio_formats.py +29 -0
- agents/realtime/config.py +22 -4
- agents/realtime/items.py +17 -1
- agents/realtime/model.py +6 -0
- agents/realtime/model_inputs.py +15 -1
- agents/realtime/openai_realtime.py +428 -139
- agents/realtime/session.py +167 -14
- agents/run.py +102 -54
- agents/tool.py +2 -2
- agents/util/_json.py +19 -1
- agents/voice/input.py +5 -4
- agents/voice/models/openai_stt.py +6 -4
- {openai_agents-0.2.10.dist-info → openai_agents-0.3.0.dist-info}/METADATA +2 -2
- {openai_agents-0.2.10.dist-info → openai_agents-0.3.0.dist-info}/RECORD +26 -24
- {openai_agents-0.2.10.dist-info → openai_agents-0.3.0.dist-info}/WHEEL +0 -0
- {openai_agents-0.2.10.dist-info → openai_agents-0.3.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -88,7 +88,7 @@ class OpenAISTTTranscriptionSession(StreamedTranscriptionSession):
|
|
|
88
88
|
self._trace_include_sensitive_data = trace_include_sensitive_data
|
|
89
89
|
self._trace_include_sensitive_audio_data = trace_include_sensitive_audio_data
|
|
90
90
|
|
|
91
|
-
self._input_queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32]] = input.queue
|
|
91
|
+
self._input_queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32] | None] = input.queue
|
|
92
92
|
self._output_queue: asyncio.Queue[str | ErrorSentinel | SessionCompleteSentinel] = (
|
|
93
93
|
asyncio.Queue()
|
|
94
94
|
)
|
|
@@ -226,7 +226,10 @@ class OpenAISTTTranscriptionSession(StreamedTranscriptionSession):
|
|
|
226
226
|
break
|
|
227
227
|
|
|
228
228
|
event_type = event.get("type", "unknown")
|
|
229
|
-
if event_type
|
|
229
|
+
if event_type in [
|
|
230
|
+
"input_audio_transcription_completed", # legacy
|
|
231
|
+
"conversation.item.input_audio_transcription.completed",
|
|
232
|
+
]:
|
|
230
233
|
transcript = cast(str, event.get("transcript", ""))
|
|
231
234
|
if len(transcript) > 0:
|
|
232
235
|
self._end_turn(transcript)
|
|
@@ -242,7 +245,7 @@ class OpenAISTTTranscriptionSession(StreamedTranscriptionSession):
|
|
|
242
245
|
await self._output_queue.put(SessionCompleteSentinel())
|
|
243
246
|
|
|
244
247
|
async def _stream_audio(
|
|
245
|
-
self, audio_queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32]]
|
|
248
|
+
self, audio_queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32] | None]
|
|
246
249
|
) -> None:
|
|
247
250
|
assert self._websocket is not None, "Websocket not initialized"
|
|
248
251
|
self._start_turn()
|
|
@@ -275,7 +278,6 @@ class OpenAISTTTranscriptionSession(StreamedTranscriptionSession):
|
|
|
275
278
|
"wss://api.openai.com/v1/realtime?intent=transcription",
|
|
276
279
|
additional_headers={
|
|
277
280
|
"Authorization": f"Bearer {self._client.api_key}",
|
|
278
|
-
"OpenAI-Beta": "realtime=v1",
|
|
279
281
|
"OpenAI-Log-Session": "1",
|
|
280
282
|
},
|
|
281
283
|
) as ws:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openai-agents
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: OpenAI Agents SDK
|
|
5
5
|
Project-URL: Homepage, https://openai.github.io/openai-agents-python/
|
|
6
6
|
Project-URL: Repository, https://github.com/openai/openai-agents-python
|
|
@@ -21,7 +21,7 @@ Classifier: Typing :: Typed
|
|
|
21
21
|
Requires-Python: >=3.9
|
|
22
22
|
Requires-Dist: griffe<2,>=1.5.6
|
|
23
23
|
Requires-Dist: mcp<2,>=1.11.0; python_version >= '3.10'
|
|
24
|
-
Requires-Dist: openai<2,>=1.
|
|
24
|
+
Requires-Dist: openai<2,>=1.107.1
|
|
25
25
|
Requires-Dist: pydantic<3,>=2.10
|
|
26
26
|
Requires-Dist: requests<3,>=2.0
|
|
27
27
|
Requires-Dist: types-requests<3,>=2.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
agents/__init__.py,sha256=Kr6-8HItTfnz5HFS9x7PVD99v_Lu9VxlE27UjX3BH8M,8000
|
|
2
2
|
agents/_config.py,sha256=ANrM7GP2VSQehDkMc9qocxkUlPwqU-i5sieMJyEwxpM,796
|
|
3
|
-
agents/_debug.py,sha256=
|
|
4
|
-
agents/_run_impl.py,sha256=
|
|
3
|
+
agents/_debug.py,sha256=dRe2dUlA9bCLp6f8bAdiX7JfGyJuHyS_DRdW0kZshl0,856
|
|
4
|
+
agents/_run_impl.py,sha256=9mW1kh9_WC9GvTgo4GyroMhthzaH-qKpTKIZxE15kEE,46352
|
|
5
5
|
agents/agent.py,sha256=IINVHZyO5iFTN3rf94YB9Hv3hUIOouVUFt9cagSJwvQ,19120
|
|
6
6
|
agents/agent_output.py,sha256=teTFK8unUN3esXhmEBO0bQGYQm1Axd5rYleDt9TFDgw,7153
|
|
7
7
|
agents/computer.py,sha256=XD44UgiUWSfniv-xKwwDP6wFKVwBiZkpaL1hO-0-7ZA,2516
|
|
@@ -17,11 +17,11 @@ agents/prompts.py,sha256=Ss5y_7s2HFcRAOAKu4WTxQszs5ybI8TfbxgEYdnj9sg,2231
|
|
|
17
17
|
agents/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
18
18
|
agents/repl.py,sha256=NX0BE5YDnmGQ2rdQsmLm3CKkQZ5m4GC95xXmUsAXJVs,2539
|
|
19
19
|
agents/result.py,sha256=YCGYHoc5X1_vLKu5QiK6F8C1ZXI3tTfLXaZoqbYgUMA,10753
|
|
20
|
-
agents/run.py,sha256=
|
|
20
|
+
agents/run.py,sha256=UXjjya8Y46Dg295sHgZO2DtgdV7li8YwD23_cYl9RPo,63138
|
|
21
21
|
agents/run_context.py,sha256=vuSUQM8O4CLensQY27-22fOqECnw7yvwL9U3WO8b_bk,851
|
|
22
22
|
agents/stream_events.py,sha256=VFyTu-DT3ZMnHLtMbg-X_lxec0doQxNfx-hVxLB0BpI,1700
|
|
23
23
|
agents/strict_schema.py,sha256=_KuEJkglmq-Fj3HSeYP4WqTvqrxbSKu6gezfz5Brhh0,5775
|
|
24
|
-
agents/tool.py,sha256=
|
|
24
|
+
agents/tool.py,sha256=mk4mKWy-K2eHIygLTNZf447oyIRqLz8Ex1R-wEQ9vS8,17023
|
|
25
25
|
agents/tool_context.py,sha256=lbnctijZeanXAThddkklF7vDrXK1Ie2_wx6JZPCOihI,1434
|
|
26
26
|
agents/usage.py,sha256=Tb5udGd3DPgD0JBdRD8fDctTE4M-zKML5uRn8ZG1yBc,1675
|
|
27
27
|
agents/version.py,sha256=_1knUwzSK-HUeZTpRUkk6Z-CIcurqXuEplbV5TLJ08E,230
|
|
@@ -32,15 +32,16 @@ agents/extensions/visualization.py,sha256=sf9D_C-HMwkbWdZccTZvvMPRy_NSiwbm48tRJl
|
|
|
32
32
|
agents/extensions/memory/__init__.py,sha256=Yionp3G3pj53zenHPZUHhR9aIDVEpu0d_PcvdytBRes,534
|
|
33
33
|
agents/extensions/memory/sqlalchemy_session.py,sha256=H0aykdB4lUikmzKgwWQqI1PSYZBvHA4TDnaj9rP4HDI,11583
|
|
34
34
|
agents/extensions/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
agents/extensions/models/litellm_model.py,sha256=
|
|
35
|
+
agents/extensions/models/litellm_model.py,sha256=wAC1AMb5ZOOV6KhYtLwjpnyzUGRstjnWwbw9fJDbGfk,16269
|
|
36
36
|
agents/extensions/models/litellm_provider.py,sha256=ZHgh1nMoEvA7NpawkzLh3JDuDFtwXUV94Rs7UrwWqAk,1083
|
|
37
37
|
agents/mcp/__init__.py,sha256=yHmmYlrmEHzUas1inRLKL2iPqbb_-107G3gKe_tyg4I,750
|
|
38
38
|
agents/mcp/server.py,sha256=4T58xiWCLiCm6JoUy_3jYWz5A8ZNsHiV1hIxjahoedU,26624
|
|
39
39
|
agents/mcp/util.py,sha256=YVdPst1wWkTwbeshs-FYbr_MtrYJwO_4NzhSwj5aE5c,8239
|
|
40
|
-
agents/memory/__init__.py,sha256=
|
|
41
|
-
agents/memory/openai_conversations_session.py,sha256=
|
|
40
|
+
agents/memory/__init__.py,sha256=EvPDQqQs6TGEYnZi3kyVmyuE3FoTB8dD8Sn2EXMOww0,322
|
|
41
|
+
agents/memory/openai_conversations_session.py,sha256=_qur7ohOIqQdIrqZYvQjNSmM_jNRtSbR56MUmFTqwEM,3316
|
|
42
42
|
agents/memory/session.py,sha256=pyyFn3r07ydhoy7vn1e_ky9OUa1a_7DKoEo8aZz2d3s,3038
|
|
43
43
|
agents/memory/sqlite_session.py,sha256=6HGzSL70mQgutITIPZUC2x2Qtj6U4hXiZTceu3Da7TM,10130
|
|
44
|
+
agents/memory/util.py,sha256=ZAHOrNVA36xICFzuNgHgEA1_s_oEMO6Wsu6-EecY8JU,586
|
|
44
45
|
agents/models/__init__.py,sha256=E0XVqWayVAsFqxucDLBW30siaqfNQsVrAnfidG_C3ok,287
|
|
45
46
|
agents/models/_openai_shared.py,sha256=4Ngwo2Fv2RXY61Pqck1cYPkSln2tDnb8Ai-ao4QG-iE,836
|
|
46
47
|
agents/models/chatcmpl_converter.py,sha256=fZHui5V0KwTr27L_Io-4iQxPXr0ZoEMOv1_kJNxW-y8,20320
|
|
@@ -50,24 +51,25 @@ agents/models/default_models.py,sha256=mlvBePn8H4UkHo7lN-wh7A3k2ciLgBUFKpROQxzdT
|
|
|
50
51
|
agents/models/fake_id.py,sha256=lbXjUUSMeAQ8eFx4V5QLUnBClHE6adJlYYav55RlG5w,268
|
|
51
52
|
agents/models/interface.py,sha256=-AFUHC8iRuGZmtQwguDw4s-M4OPL2y2mct4TAmWvVrU,4057
|
|
52
53
|
agents/models/multi_provider.py,sha256=aiDbls5G4YomPfN6qH1pGlj41WS5jlDp2T82zm6qcnM,5578
|
|
53
|
-
agents/models/openai_chatcompletions.py,sha256=
|
|
54
|
+
agents/models/openai_chatcompletions.py,sha256=sEi32U_RIDxdFXb1Bxro_3r0sl-U2CrJdAk3xWQBUxA,13704
|
|
54
55
|
agents/models/openai_provider.py,sha256=vBu3mlgDBrI_cZVVmfnWBHoPlJlsmld3lfdX8sNQQAM,3624
|
|
55
|
-
agents/models/openai_responses.py,sha256=
|
|
56
|
+
agents/models/openai_responses.py,sha256=s9qof2axCbGxsL-FwLEc1mP0RFZ-RXF9cuoww8zp320,18599
|
|
56
57
|
agents/realtime/README.md,sha256=5YCYXH5ULmlWoWo1PE9TlbHjeYgjnp-xY8ZssSFY2Vk,126
|
|
57
58
|
agents/realtime/__init__.py,sha256=7qvzK8QJuHRnPHxDgDj21v8-lnSN4Uurg9znwJv_Tqg,4923
|
|
58
59
|
agents/realtime/_default_tracker.py,sha256=4OMxBvD1MnZmMn6JZYKL42uWhVzvK6NdDLDfPP54d78,1765
|
|
59
|
-
agents/realtime/_util.py,sha256=
|
|
60
|
-
agents/realtime/agent.py,sha256=
|
|
61
|
-
agents/realtime/
|
|
60
|
+
agents/realtime/_util.py,sha256=ehBzUN1RTD2m2TXq73Jm4WohQzJ6y_MfnF5MaK8uu14,341
|
|
61
|
+
agents/realtime/agent.py,sha256=bkegBJ_lc3z3NtnlIyEkVZFxZWBJwVjsQVzpQZAu7PM,4283
|
|
62
|
+
agents/realtime/audio_formats.py,sha256=DBUWVVff4XY5BT6Mol86tF4PFMp5OIS3LmAbqUmQn_k,1019
|
|
63
|
+
agents/realtime/config.py,sha256=S7CzolOuZj9QDRO9WMsF8ZUnsX5Hkf8TSg6od1RUYmg,6567
|
|
62
64
|
agents/realtime/events.py,sha256=eANiNNyYlp_1Ybdl-MOwXRVTDtrK9hfgn6iw0xNxnaY,5889
|
|
63
65
|
agents/realtime/handoffs.py,sha256=avLFix5kEutel57IRcddssGiVHzGptOzWL9OqPaLVh8,6702
|
|
64
|
-
agents/realtime/items.py,sha256=
|
|
65
|
-
agents/realtime/model.py,sha256=
|
|
66
|
+
agents/realtime/items.py,sha256=5EG768FkKpbk-dhe4b_7BfFpdUEFWtxoiVUtNI9KXsc,5517
|
|
67
|
+
agents/realtime/model.py,sha256=Lnb9pEcvnlIdXJUcldVyioaX5lpmrBou5FZoNJe4XfA,6457
|
|
66
68
|
agents/realtime/model_events.py,sha256=YixBKmzlCrhtzCosj0SysyZpyHbZ90455gDr4Kr7Ey8,4338
|
|
67
|
-
agents/realtime/model_inputs.py,sha256=
|
|
68
|
-
agents/realtime/openai_realtime.py,sha256=
|
|
69
|
+
agents/realtime/model_inputs.py,sha256=gRas0-ohirmGbCMWc8tHTo-e3ZPcPn7TK9BauCK9ynA,2657
|
|
70
|
+
agents/realtime/openai_realtime.py,sha256=RbpBL7Im5l5OoJm2j9woIjoRMV8aVSUpPPoimQZe19Y,43945
|
|
69
71
|
agents/realtime/runner.py,sha256=KfU7utmc9QFH2htIKN2IN9H-5EnB0qN9ezmvlRTnOm4,2511
|
|
70
|
-
agents/realtime/session.py,sha256=
|
|
72
|
+
agents/realtime/session.py,sha256=_QWX-qGYQ4qyWcXN1xX3MqhXsSGPd1hEexoRzBSmwN8,35103
|
|
71
73
|
agents/tracing/__init__.py,sha256=5HO_6na5S6EwICgwl50OMtxiIIosUrqalhvldlYvSVc,2991
|
|
72
74
|
agents/tracing/create.py,sha256=xpJ4ZRnGyUDPKoVVkA_8hmdhtwOKGhSkwRco2AQIhAo,18003
|
|
73
75
|
agents/tracing/logger.py,sha256=J4KUDRSGa7x5UVfUwWe-gbKwoaq8AeETRqkPt3QvtGg,68
|
|
@@ -83,7 +85,7 @@ agents/tracing/util.py,sha256=J7IZgVDmeW0aZDw8LBSjBKrlQbcOmaqZE7XQjolPwi8,490
|
|
|
83
85
|
agents/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
86
|
agents/util/_coro.py,sha256=S38XUYFC7bqTELSgMUBsAX1GoRlIrV7coupcUAWH__4,45
|
|
85
87
|
agents/util/_error_tracing.py,sha256=hdkYNx180b18lP0PSB1toE5atNHsMg_Bm9Osw812vLo,421
|
|
86
|
-
agents/util/_json.py,sha256=
|
|
88
|
+
agents/util/_json.py,sha256=wC2NwwQspxo-PaZ3SmmlKS9KrBO5Gw4qkncpwtf86vA,1526
|
|
87
89
|
agents/util/_pretty_print.py,sha256=pnrM81KRG4G21jZnYrYBCkPgtUeP8qcnJm-9tpAV1WA,2738
|
|
88
90
|
agents/util/_transforms.py,sha256=CZe74NOHkHneyo4fHYfFWksCSTn-kXtEyejL9P0_xlA,270
|
|
89
91
|
agents/util/_types.py,sha256=8KxYfCw0gYSMWcQmacJoc3Q7Lc46LmT-AWvhF10KJ-E,160
|
|
@@ -91,7 +93,7 @@ agents/voice/__init__.py,sha256=4VWBUjyoXC6dGFuk-oZQGg8T32bFxVwy371c-zDK-EU,1537
|
|
|
91
93
|
agents/voice/events.py,sha256=4aPAZC0__ocgmg_mcX4c1zv9Go-YdKIVItQ2kYgtye0,1216
|
|
92
94
|
agents/voice/exceptions.py,sha256=QcyfvaUTBe4gxbFP82oDSa_puzZ4Z4O4k01B8pAHnK0,233
|
|
93
95
|
agents/voice/imports.py,sha256=VaE5I8aJTP9Zl_0-y9dx1UcAP7KPRDMaikFK2jFnn8s,348
|
|
94
|
-
agents/voice/input.py,sha256=
|
|
96
|
+
agents/voice/input.py,sha256=L4uriQOvMt5Sxn88pNrdeOyyA8KWVz2y4fOyvvVjd9s,3011
|
|
95
97
|
agents/voice/model.py,sha256=LWnIWEwU0-aFkff3kbTKkxejnYqzS2XHG5Qm2YcrzFI,5956
|
|
96
98
|
agents/voice/pipeline.py,sha256=F_b9QSPVbIJAlxpDoHqSt3mWqRqLnm8Dbfk4H9sJ-3M,6491
|
|
97
99
|
agents/voice/pipeline_config.py,sha256=_cynbnzxvQijxkGrMYHJzIV54F9bRvDsPV24qexVO8c,1759
|
|
@@ -100,9 +102,9 @@ agents/voice/utils.py,sha256=MrRomVqBLXeMAOue-Itwh0Fc5HjB0QCMKXclqFPhrbI,1309
|
|
|
100
102
|
agents/voice/workflow.py,sha256=m_-_4qU1gEE5gcGahiE2IrIimmRW2X1rR20zZEGivSc,3795
|
|
101
103
|
agents/voice/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
102
104
|
agents/voice/models/openai_model_provider.py,sha256=Khn0uT-VhsEbe7_OhBMGFQzXNwL80gcWZyTHl3CaBII,3587
|
|
103
|
-
agents/voice/models/openai_stt.py,sha256=
|
|
105
|
+
agents/voice/models/openai_stt.py,sha256=B-ytVW3U7WhM6RWpo8ynqzP34lec84cA_EXuj7egq3Y,16956
|
|
104
106
|
agents/voice/models/openai_tts.py,sha256=4KoLQuFDHKu5a1VTJlu9Nj3MHwMlrn9wfT_liJDJ2dw,1477
|
|
105
|
-
openai_agents-0.
|
|
106
|
-
openai_agents-0.
|
|
107
|
-
openai_agents-0.
|
|
108
|
-
openai_agents-0.
|
|
107
|
+
openai_agents-0.3.0.dist-info/METADATA,sha256=iz57XBpv8soW9sPvbkJ1SVbU5IT6AQo3aZOpv5ydofU,12380
|
|
108
|
+
openai_agents-0.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
109
|
+
openai_agents-0.3.0.dist-info/licenses/LICENSE,sha256=E994EspT7Krhy0qGiES7WYNzBHrh1YDk3r--8d1baRU,1063
|
|
110
|
+
openai_agents-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|