@@ -46,22 +46,21 @@ private ChatDocument MapChatDocument(dynamic row)
4646
4747 private object MapChatToParameters ( ChatDocument chat )
4848 {
49- return chat is null
50- ? throw new ArgumentNullException ( nameof ( chat ) )
51- : new
52- {
53- chat . Id ,
54- chat . Name ,
55- chat . Model ,
56- Messages = JsonSerializer . Serialize ( chat . Messages , _jsonOptions ) ,
57- Type = JsonSerializer . Serialize ( chat . Type , _jsonOptions ) ,
58- ConvState = JsonSerializer . Serialize ( chat . ConvState , _jsonOptions ) ,
59- InferenceParams = JsonSerializer . Serialize ( chat . InferenceParams , _jsonOptions ) ,
60- MemoryParams = JsonSerializer . Serialize ( chat . MemoryParams , _jsonOptions ) ,
61- Properties = JsonSerializer . Serialize ( chat . Properties , _jsonOptions ) ,
62- Visual = chat . ImageGen ,
63- chat . Interactive
64- } ;
49+ ArgumentNullException . ThrowIfNull ( chat ) ;
50+ return new
51+ {
52+ chat . Id ,
53+ chat . Name ,
54+ chat . Model ,
55+ Messages = JsonSerializer . Serialize ( chat . Messages , _jsonOptions ) ,
56+ Type = JsonSerializer . Serialize ( chat . Type , _jsonOptions ) ,
57+ ConvState = JsonSerializer . Serialize ( chat . ConvState , _jsonOptions ) ,
58+ InferenceParams = JsonSerializer . Serialize ( chat . InferenceParams , _jsonOptions ) ,
59+ MemoryParams = JsonSerializer . Serialize ( chat . MemoryParams , _jsonOptions ) ,
60+ Properties = JsonSerializer . Serialize ( chat . Properties , _jsonOptions ) ,
61+ Visual = chat . ImageGen ,
62+ chat . Interactive
63+ } ;
6564 }
6665
6766 public async Task < IEnumerable < ChatDocument > > GetAllChats ( )
0 commit comments