Interface IChatModelClient
- Namespace
- MailFathom.Application.Chat
- Assembly
- MailFathom.Application.dll
Produces one model answer for a conversation.
public interface IChatModelClient
Remarks
The second kind of outbound AI call this system makes, and deliberately separate from the first. Embeddings and generation are configured independently because the states they produce are different: without an embedding provider semantic search is off and lexical search continues, while without a chat provider search is unaffected and only the answering capability stops being offered. One flag for both would be wrong in both directions.
The port carries text and nothing above it. It composes no prompt, retrieves nothing, offers the model no tools, and keeps no conversation: what to say is decided by whoever calls, and this is what says it. The model, the generation parameters, the bounds, and the timeout are the deployment's and come from validated configuration, which is why none of them appears in this signature.
It is not streaming. A caller that presents an answer as it arrives needs a second method with its own cancellation and its own partial-answer semantics, and no caller needs one yet.
Methods
- AnswerAsync(IReadOnlyList<ChatMessage>, CancellationToken)
Sends a conversation and returns what the model answered.