@@ -42,7 +42,8 @@ public function __construct(
4242 */
4343 public function completions (): Completions
4444 {
45- return new Completions ($ this ->transporter , $ this ->events );
45+ return (new Completions ($ this ->transporter ))
46+ ->setEventDispatcher ($ this ->events );
4647 }
4748
4849 /**
@@ -52,7 +53,8 @@ public function completions(): Completions
5253 */
5354 public function chat (): Chat
5455 {
55- return new Chat ($ this ->transporter , $ this ->events );
56+ return (new Chat ($ this ->transporter ))
57+ ->setEventDispatcher ($ this ->events );
5658 }
5759
5860 /**
@@ -62,7 +64,8 @@ public function chat(): Chat
6264 */
6365 public function embeddings (): Embeddings
6466 {
65- return new Embeddings ($ this ->transporter , $ this ->events );
67+ return (new Embeddings ($ this ->transporter ))
68+ ->setEventDispatcher ($ this ->events );
6669 }
6770
6871 /**
@@ -72,7 +75,8 @@ public function embeddings(): Embeddings
7275 */
7376 public function audio (): Audio
7477 {
75- return new Audio ($ this ->transporter , $ this ->events );
78+ return (new Audio ($ this ->transporter ))
79+ ->setEventDispatcher ($ this ->events );
7680 }
7781
7882 /**
@@ -82,7 +86,8 @@ public function audio(): Audio
8286 */
8387 public function edits (): Edits
8488 {
85- return new Edits ($ this ->transporter , $ this ->events );
89+ return (new Edits ($ this ->transporter ))
90+ ->setEventDispatcher ($ this ->events );
8691 }
8792
8893 /**
@@ -92,7 +97,8 @@ public function edits(): Edits
9297 */
9398 public function files (): Files
9499 {
95- return new Files ($ this ->transporter , $ this ->events );
100+ return (new Files ($ this ->transporter ))
101+ ->setEventDispatcher ($ this ->events );
96102 }
97103
98104 /**
@@ -102,7 +108,8 @@ public function files(): Files
102108 */
103109 public function models (): Models
104110 {
105- return new Models ($ this ->transporter , $ this ->events );
111+ return (new Models ($ this ->transporter ))
112+ ->setEventDispatcher ($ this ->events );
106113 }
107114
108115 /**
@@ -112,7 +119,8 @@ public function models(): Models
112119 */
113120 public function fineTuning (): FineTuning
114121 {
115- return new FineTuning ($ this ->transporter , $ this ->events );
122+ return (new FineTuning ($ this ->transporter ))
123+ ->setEventDispatcher ($ this ->events );
116124 }
117125
118126 /**
@@ -124,7 +132,8 @@ public function fineTuning(): FineTuning
124132 */
125133 public function fineTunes (): FineTunes
126134 {
127- return new FineTunes ($ this ->transporter , $ this ->events );
135+ return (new FineTunes ($ this ->transporter ))
136+ ->setEventDispatcher ($ this ->events );
128137 }
129138
130139 /**
@@ -134,7 +143,8 @@ public function fineTunes(): FineTunes
134143 */
135144 public function moderations (): Moderations
136145 {
137- return new Moderations ($ this ->transporter , $ this ->events );
146+ return (new Moderations ($ this ->transporter ))
147+ ->setEventDispatcher ($ this ->events );
138148 }
139149
140150 /**
@@ -144,7 +154,8 @@ public function moderations(): Moderations
144154 */
145155 public function images (): Images
146156 {
147- return new Images ($ this ->transporter , $ this ->events );
157+ return (new Images ($ this ->transporter ))
158+ ->setEventDispatcher ($ this ->events );
148159 }
149160
150161 /**
@@ -154,7 +165,8 @@ public function images(): Images
154165 */
155166 public function assistants (): Assistants
156167 {
157- return new Assistants ($ this ->transporter , $ this ->events );
168+ return (new Assistants ($ this ->transporter ))
169+ ->setEventDispatcher ($ this ->events );
158170 }
159171
160172 /**
@@ -164,6 +176,7 @@ public function assistants(): Assistants
164176 */
165177 public function threads (): ThreadsContract
166178 {
167- return new Threads ($ this ->transporter , $ this ->events );
179+ return (new Threads ($ this ->transporter ))
180+ ->setEventDispatcher ($ this ->events );
168181 }
169182}
0 commit comments