Commit 166ab20
authored
fix(OpenAI): Add support for reasoning text streaming events (#673)
* Add support for `response.reasoning_text.delta` and `response.reasoning_text.done` events.
* Remove `type` attribute from `ReasoningTextDelta` and `ReasoningTextDone` responses.1 parent a00d775 commit 166ab20Copy full SHA for 166ab20
File tree
Expand file treeCollapse file tree
7 files changed
+179
-1
lines changedOpen diff view settings
Filter options
- src/Responses/Responses
- Streaming
- tests
- Fixtures
- Streams
- Responses/Responses
Expand file treeCollapse file tree
7 files changed
+179
-1
lines changedOpen diff view settings
Collapse file
src/Responses/Responses/CreateStreamedResponse.php
Copy file name to clipboardExpand all lines: src/Responses/Responses/CreateStreamedResponse.php+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
| 32 | + |
| 33 | + |
32 | 34 | |
33 | 35 | |
34 | 36 | |
| ||
50 | 52 | |
51 | 53 | |
52 | 54 | |
53 | | - |
| 55 | + |
54 | 56 | |
55 | 57 | |
56 | 58 | |
| ||
95 | 97 | |
96 | 98 | |
97 | 99 | |
| 100 | + |
| 101 | + |
98 | 102 | |
99 | 103 | |
100 | 104 | |
|
Collapse file
src/Responses/Responses/Streaming/ReasoningTextDelta.php
Copy file name to clipboard+66Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
Collapse file
src/Responses/Responses/Streaming/ReasoningTextDone.php
Copy file name to clipboard+66Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
Collapse file
tests/Fixtures/Responses.php
Copy file name to clipboardExpand all lines: tests/Fixtures/Responses.php+10Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
760 | 760 | |
761 | 761 | |
762 | 762 | |
| 763 | + |
| 764 | + |
| 765 | + |
| 766 | + |
| 767 | + |
| 768 | + |
| 769 | + |
| 770 | + |
| 771 | + |
| 772 | + |
Collapse file
tests/Fixtures/Streams/ResponseReasoningTextDelta.txt
Copy file name to clipboard+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
Collapse file
tests/Fixtures/Streams/ResponseReasoningTextDone.txt
Copy file name to clipboard+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
Collapse file
tests/Responses/Responses/CreateStreamedResponse.php
Copy file name to clipboardExpand all lines: tests/Responses/Responses/CreateStreamedResponse.php+30Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
| 5 | + |
| 6 | + |
5 | 7 | |
6 | 8 | |
7 | 9 | |
| ||
20 | 22 | |
21 | 23 | |
22 | 24 | |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
0 commit comments