SmartChatBoxAdapter
Wisej.AI.Adapters.SmartChatBoxAdapter
Last updated
Wisej.AI.Adapters.SmartChatBoxAdapter
Last updated
Namespace: Wisej.AI.Adapters
Assembly: Wisej.AI (3.5.0.0)
Turns the control into a AI-powered bot. It can answer any question (depending on the AI model being used) and can invoke methods in your applications as needed (see ).
Works with:
AzureAI/OpenAI gpt-4
AzureAI/OpenAI gpt-4o
AzureAI/OpenAI gpt-3.5
AzureAI/Anthropic Claude
Google Gemini
Llama3:8b and 70b
You are not limited to what the model can answer. When you add a method decorated with the the AI can invoke it when necessary in order to retrieve any information or take any action. This is a simple example that provides current date/time knowledge to the AI bot, including the name of the day:
When the AI needs to know the current date/time it will invoke this method. For example: "When is the next national holiday in {country}?". In this example you can see how to allow the AI to take an action.
When the AI wants to change the header color it will invoke this method with the correct parameter. Use this feature with a lot of caution! A method like "LaunchThermonuclearStrike()" is not allowed.
answer
sources
args
control
control
args
text
text
Resets the conversation history.
removeMessages
Indicates whether all messages from the ChatBox control should also be removed.
control
Represents a provider that supplies tools.
Initializes a new instance of .
: Gets or sets a value indicating whether the history of the conversation is cleared after each response. (Default: False
)
: Icon of the AI bot. (Default: "resource.wx/Wisej.AI/Icons/wisej-avatar.svg"
)
: Name of the AI bot. (Default: "Wisej.AI"
)
:
: The User associated to the AI bot. It's created using and .
Returns: .
Returns: .
Returns: .
Returns: .