IAIProvider Interface |
public interface IAIProvider
The IAIProvider type exposes the following members.
| Name | Description | |
|---|---|---|
| LastUsage | Token usage of the last API call (input/output tokens, one call). Zeroes when the API did not report usage information. |
| Name | Description | |
|---|---|---|
| HandleChat | Sends messages to the AI and returns the agent reply. The reply is automatically appended to messages. | |
| HandleChatWithTools | Sends messages together with available tools to the AI. If the model decides to invoke one or more tools the descriptors are placed in toolCalls and the method returns Empty; the agent message (with embedded tool-call data) is appended to messages automatically so the conversation can be continued after the caller executes the tools. If the model produces a text reply the reply is appended to messages and returned. |