Skip to main content

Get started

The intelli chatbot function connects with the leading AI models such as GPT, Claude, Gemini and Mistral through one input. You can switch between providers, or upgrade to the latest models, without changing the code of your app.

Core Components​

ChatModelInput: This class provides a unified entry to all chatbot providers. It holds the system message, the model, the message history, and model parameters like temperature and max tokens.

Chatbot: The primary class that interfaces with the AI providers. It takes the API key, the provider name, and optional settings such as a timeout, a proxy or a server URL.

Available Providers​

Use the ChatProvider enum, or its string value, to select the provider:

ProviderChatProviderValue
OpenAI and Azure OpenAIChatProvider.OPENAIopenai
AnthropicChatProvider.ANTHROPICanthropic
Google GeminiChatProvider.GEMINIgemini
MistralChatProvider.MISTRALmistral
NVIDIA (DeepSeek, Llama and NIM)ChatProvider.NVIDIAnvidia
Self-hosted vLLMChatProvider.VLLMvllm
Offline llama.cppChatProvider.LLAMACPPllamacpp
Offline Keras (Gemma, Llama, Mistral)ChatProvider.KERASkeras

See DeepSeek & Llama, vLLM, llama.cpp and Gemma for the provider specific setup.

Example​

Imports​
from intelli.model.input.chatbot_input import ChatModelInput
from intelli.function.chatbot import Chatbot, ChatProvider
Prepare the input​
chat_input = ChatModelInput(system="You are a helpful assistant.", model="gpt-5.5")
chat_input.add_user_message("Explain the plot of the Inception movie in one line.")
Call the chatbot​
chatbot = Chatbot(api_key=YOUR_API_KEY, provider=ChatProvider.OPENAI)
response = chatbot.chat(chat_input)
print(response[0])

chat returns a list of replies. When the model calls a tool, the item is a dictionary instead of text, see Tool calling.

Default Models​

When you omit the model, intelli picks a current default for the provider:

ProviderDefault model
Openaigpt-5.5
Anthropicclaude-sonnet-5
Geminigemini-2.5-flash
Mistralmistral-large-latest

Use claude-opus-5 for the larger Anthropic model. The Claude 5 family and Opus 4.7 and above dropped the sampling parameters, so intelli omits temperature for those models and they work without any change on your side.

Streaming​

stream yields the reply as it is generated. It is available for openai, anthropic, nvidia, vllm and llamacpp.

chat_input = ChatModelInput("You are a helpful assistant.", model="claude-sonnet-5")
chat_input.add_user_message("Write a short poem about the sea.")

chatbot = Chatbot(YOUR_ANTHROPIC_KEY, ChatProvider.ANTHROPIC)
for chunk in chatbot.stream(chat_input):
print(chunk, end="", flush=True)

The GPT-5 family runs on the responses API, which intelli calls through chat only. To stream from openai, use a chat completions model such as gpt-4.1, or add the :chat suffix described below.

GPT-5 Parameters​

The GPT-5 family runs on the responses API, and the input accepts its parameters:

chat_input = ChatModelInput(
system="You are a helpful assistant.",
model="gpt-5.5",
reasoning_effort="low", # low, medium, high, xhigh, none
verbosity="medium", # low, medium, high
max_tokens=512, # sent as max_output_tokens
)

tool_choice is available as well, on both the openai and the anthropic paths. To force the classic chat completions endpoint for a GPT-5 deployment, add :chat to the model id, for example gpt-5.5:chat.

Chatbot Options​

Pass the optional settings in options:

OptionProvidersDescription
timeoutall remote providersRequest timeout in seconds, default 180.
proxy_helperopenaiRoute the calls to Azure OpenAI or another proxy.
baseUrlnvidia, vllmThe URL of your NIM or vLLM server.
model_path, model_paramsllamacppThe local GGUF file and its parameters.
model_name, model_paramskerasThe Keras model and the Kaggle credentials.
chatbot = Chatbot(YOUR_API_KEY, ChatProvider.OPENAI, options={"timeout": 60})

Azure OpenAI​

Set your Azure resource in ProxyHelper, then pass the deployment name as the model:

from intelli.utils.proxy_helper import ProxyHelper

proxy_helper = ProxyHelper()
proxy_helper.set_azure_openai(YOUR_AZURE_RESOURCE)

azure_bot = Chatbot(YOUR_AZURE_API_KEY, ChatProvider.OPENAI, options={"proxy_helper": proxy_helper})

chat_input = ChatModelInput("You are a helpful assistant.", model=YOUR_DEPLOYMENT_NAME)
chat_input.add_user_message("What is the capital of France?")
response = azure_bot.chat(chat_input)

Get the next agent guide in your inbox.

Be the first to read new guides on AI agents, RAG and MCP apps.