Click or drag to resize

IAIProvider Interface

Interface implemented by all AI chat providers (OpenAI, Azure OpenAI, Anthropic, Ollama) used by the AI Agents feature.

Namespace: Seal.AI
Assembly: SealLibrary (in SealLibrary.dll) Version: 10.0.1.0+a44cd3a7f03c2bf3cdbd971a878c679e40bed08a
Syntax
C#
public interface IAIProvider

The IAIProvider type exposes the following members.

Properties
 NameDescription
Public propertyLastUsage Token usage of the last API call (input/output tokens, one call). Zeroes when the API did not report usage information.
Top
Methods
 NameDescription
Public methodHandleChat Sends messages to the AI and returns the agent reply. The reply is automatically appended to messages.
Public methodHandleChatWithTools 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.
Top
See Also