14
14
* limitations under the License.
15
15
*/
16
16
17
+ // For now, using this to hide some functions causing problems with the build.
18
+ #define HIDE_IASYNCENUMERABLE
19
+
17
20
using System ;
18
21
using System . Collections . Generic ;
19
22
using System . Linq ;
@@ -100,8 +103,7 @@ public Task<GenerateContentResponse> GenerateContentAsync(
100
103
return GenerateContentAsyncInternal ( content ) ;
101
104
}
102
105
103
- #define HIDE_IASYNCENUMERABLE
104
- #if ! defined( HIDE_IASYNCENUMERABLE )
106
+ #if ! HIDE_IASYNCENUMERABLE
105
107
public IAsyncEnumerable < GenerateContentResponse > GenerateContentStreamAsync (
106
108
params ModelContent [ ] content ) {
107
109
return GenerateContentStreamAsync ( ( IEnumerable < ModelContent > ) content ) ;
@@ -163,7 +165,7 @@ private async Task<GenerateContentResponse> GenerateContentAsyncInternal(
163
165
return GenerateContentResponse . FromJson ( result ) ;
164
166
}
165
167
166
- #if ! defined ( HIDE_IASYNCENUMERABLE )
168
+ #if ! HIDE_IASYNCENUMERABLE
167
169
private async IAsyncEnumerable < GenerateContentResponse > GenerateContentStreamAsyncInternal (
168
170
IEnumerable < ModelContent > content ) {
169
171
// TODO: Implementation
@@ -188,12 +190,11 @@ private string GetURL() {
188
190
}
189
191
190
192
private string ModelContentsToJson ( IEnumerable < ModelContent > contents ) {
191
- Dictionary < string , object > jsonDict = new ( )
192
- {
193
+ Dictionary < string , object > jsonDict = new ( ) {
193
194
// Convert the Contents into a list of Json dictionaries
194
195
[ "contents" ] = contents . Select ( c => c . ToJson ( ) ) . ToList ( )
195
- // TODO: All the other settings
196
196
} ;
197
+ // TODO: All the other settings
197
198
198
199
return Json . Serialize ( jsonDict ) ;
199
200
}
0 commit comments