@@ -42,8 +42,7 @@ public function __construct(
4242     */ 
4343    public  function  completions (): Completions 
4444    {
45-         return  (new  Completions ($ this transporter ))
46-             ->setEventDispatcher ($ this events );
45+         return  new  Completions ($ this transporter , $ this events );
4746    }
4847
4948    /** 
@@ -53,8 +52,7 @@ public function completions(): Completions
5352     */ 
5453    public  function  chat (): Chat 
5554    {
56-         return  (new  Chat ($ this transporter ))
57-             ->setEventDispatcher ($ this events );
55+         return  new  Chat ($ this transporter , $ this events );
5856    }
5957
6058    /** 
@@ -64,8 +62,7 @@ public function chat(): Chat
6462     */ 
6563    public  function  embeddings (): Embeddings 
6664    {
67-         return  (new  Embeddings ($ this transporter ))
68-             ->setEventDispatcher ($ this events );
65+         return  new  Embeddings ($ this transporter , $ this events );
6966    }
7067
7168    /** 
@@ -75,8 +72,7 @@ public function embeddings(): Embeddings
7572     */ 
7673    public  function  audio (): Audio 
7774    {
78-         return  (new  Audio ($ this transporter ))
79-             ->setEventDispatcher ($ this events );
75+         return  new  Audio ($ this transporter , $ this events );
8076    }
8177
8278    /** 
@@ -86,8 +82,7 @@ public function audio(): Audio
8682     */ 
8783    public  function  edits (): Edits 
8884    {
89-         return  (new  Edits ($ this transporter ))
90-             ->setEventDispatcher ($ this events );
85+         return  new  Edits ($ this transporter , $ this events );
9186    }
9287
9388    /** 
@@ -97,8 +92,7 @@ public function edits(): Edits
9792     */ 
9893    public  function  files (): Files 
9994    {
100-         return  (new  Files ($ this transporter ))
101-             ->setEventDispatcher ($ this events );
95+         return  new  Files ($ this transporter , $ this events );
10296    }
10397
10498    /** 
@@ -108,8 +102,7 @@ public function files(): Files
108102     */ 
109103    public  function  models (): Models 
110104    {
111-         return  (new  Models ($ this transporter ))
112-             ->setEventDispatcher ($ this events );
105+         return  new  Models ($ this transporter , $ this events );
113106    }
114107
115108    /** 
@@ -119,8 +112,7 @@ public function models(): Models
119112     */ 
120113    public  function  fineTuning (): FineTuning 
121114    {
122-         return  (new  FineTuning ($ this transporter ))
123-             ->setEventDispatcher ($ this events );
115+         return  new  FineTuning ($ this transporter , $ this events );
124116    }
125117
126118    /** 
@@ -132,8 +124,7 @@ public function fineTuning(): FineTuning
132124     */ 
133125    public  function  fineTunes (): FineTunes 
134126    {
135-         return  (new  FineTunes ($ this transporter ))
136-             ->setEventDispatcher ($ this events );
127+         return  new  FineTunes ($ this transporter , $ this events );
137128    }
138129
139130    /** 
@@ -143,8 +134,7 @@ public function fineTunes(): FineTunes
143134     */ 
144135    public  function  moderations (): Moderations 
145136    {
146-         return  (new  Moderations ($ this transporter ))
147-             ->setEventDispatcher ($ this events );
137+         return  new  Moderations ($ this transporter , $ this events );
148138    }
149139
150140    /** 
@@ -154,8 +144,7 @@ public function moderations(): Moderations
154144     */ 
155145    public  function  images (): Images 
156146    {
157-         return  (new  Images ($ this transporter ))
158-             ->setEventDispatcher ($ this events );
147+         return  new  Images ($ this transporter , $ this events );
159148    }
160149
161150    /** 
@@ -165,8 +154,7 @@ public function images(): Images
165154     */ 
166155    public  function  assistants (): Assistants 
167156    {
168-         return  (new  Assistants ($ this transporter ))
169-             ->setEventDispatcher ($ this events );
157+         return  new  Assistants ($ this transporter , $ this events );
170158    }
171159
172160    /** 
@@ -176,7 +164,6 @@ public function assistants(): Assistants
176164     */ 
177165    public  function  threads (): ThreadsContract 
178166    {
179-         return  (new  Threads ($ this transporter ))
180-             ->setEventDispatcher ($ this events );
167+         return  new  Threads ($ this transporter , $ this events );
181168    }
182169}
0 commit comments