1212
1313namespace MaIN . Core . Hub . Contexts ;
1414
15- public sealed class ChatContext : IChatBuilderEntryPoint , IChatMessageBuilder , IChatCompletionBuilder
15+ public sealed class ChatContext : IChatBuilderEntryPoint , IChatMessageBuilder , IChatConfigurationBuilder
1616{
1717 private readonly IChatService _chatService ;
1818 private bool _preProcess ;
@@ -58,38 +58,38 @@ public IChatMessageBuilder EnableVisual()
5858 return this ;
5959 }
6060
61- public IChatCompletionBuilder WithInferenceParams ( InferenceParams inferenceParams )
61+ public IChatConfigurationBuilder WithInferenceParams ( InferenceParams inferenceParams )
6262 {
6363 _chat . InterferenceParams = inferenceParams ;
6464 return this ;
6565 }
6666
67- public IChatCompletionBuilder WithTools ( ToolsConfiguration toolsConfiguration )
67+ public IChatConfigurationBuilder WithTools ( ToolsConfiguration toolsConfiguration )
6868 {
6969 _chat . ToolsConfiguration = toolsConfiguration ;
7070 return this ;
7171 }
7272
73- public IChatCompletionBuilder WithMemoryParams ( MemoryParams memoryParams )
73+ public IChatConfigurationBuilder WithMemoryParams ( MemoryParams memoryParams )
7474 {
7575 _chat . MemoryParams = memoryParams ;
7676 return this ;
7777 }
7878
79- public IChatCompletionBuilder Speak ( TextToSpeechParams speechParams )
79+ public IChatConfigurationBuilder Speak ( TextToSpeechParams speechParams )
8080 {
8181 _chat . Visual = false ;
8282 _chat . TextToSpeechParams = speechParams ;
8383 return this ;
8484 }
8585
86- public IChatCompletionBuilder WithBackend ( BackendType backendType )
86+ public IChatConfigurationBuilder WithBackend ( BackendType backendType )
8787 {
8888 _chat . Backend = backendType ;
8989 return this ;
9090 }
9191
92- public IChatCompletionBuilder WithSystemPrompt ( string systemPrompt )
92+ public IChatConfigurationBuilder WithSystemPrompt ( string systemPrompt )
9393 {
9494 var message = new Message
9595 {
@@ -103,13 +103,13 @@ public IChatCompletionBuilder WithSystemPrompt(string systemPrompt)
103103 return this ;
104104 }
105105
106- public IChatCompletionBuilder WithMessage ( string content )
106+ public IChatConfigurationBuilder WithMessage ( string content )
107107 {
108108 _chat . Messages . Add ( new Message { Role = "User" , Content = content , Type = MessageType . LocalLLM , Time = DateTime . Now } ) ;
109109 return this ;
110110 }
111111
112- public IChatCompletionBuilder WithMessage ( string content , byte [ ] image )
112+ public IChatConfigurationBuilder WithMessage ( string content , byte [ ] image )
113113 {
114114 var message = new Message
115115 {
@@ -124,28 +124,28 @@ public IChatCompletionBuilder WithMessage(string content, byte[] image)
124124 return this ;
125125 }
126126
127- public IChatCompletionBuilder WithMessages ( IEnumerable < Message > messages )
127+ public IChatConfigurationBuilder WithMessages ( IEnumerable < Message > messages )
128128 {
129129 _chat . Messages . AddRange ( messages ) ;
130130 return this ;
131131 }
132132
133- public IChatCompletionBuilder WithFiles ( List < FileStream > file , bool preProcess = false )
133+ public IChatConfigurationBuilder WithFiles ( List < FileStream > file , bool preProcess = false )
134134 {
135135 _files = file . Select ( f => new FileInfo { Name = Path . GetFileName ( f . Name ) , StreamContent = f , Extension = Path . GetExtension ( f . Name ) } )
136136 . ToList ( ) ;
137137 _preProcess = preProcess ;
138138 return this ;
139139 }
140140
141- public IChatCompletionBuilder WithFiles ( List < FileInfo > file , bool preProcess = false )
141+ public IChatConfigurationBuilder WithFiles ( List < FileInfo > file , bool preProcess = false )
142142 {
143143 _files = file ;
144144 _preProcess = preProcess ;
145145 return this ;
146146 }
147147
148- public IChatCompletionBuilder WithFiles ( List < string > file , bool preProcess = false )
148+ public IChatConfigurationBuilder WithFiles ( List < string > file , bool preProcess = false )
149149 {
150150 _files = file
151151 . Select ( path =>
@@ -160,7 +160,7 @@ public IChatCompletionBuilder WithFiles(List<string> file, bool preProcess = fal
160160 return this ;
161161 }
162162
163- public IChatCompletionBuilder DisableCache ( )
163+ public IChatConfigurationBuilder DisableCache ( )
164164 {
165165 _chat . Properties . AddProperty ( ServiceConstants . Properties . DisableCacheProperty ) ;
166166 return this ;
@@ -191,7 +191,7 @@ public async Task<ChatResult> CompleteAsync(
191191 return result ;
192192 }
193193
194- public async Task < IChatCompletionBuilder > FromExisting ( string chatId )
194+ public async Task < IChatConfigurationBuilder > FromExisting ( string chatId )
195195 {
196196 var existing = await _chatService . GetById ( chatId ) ;
197197 return existing == null
0 commit comments