Skip to content

Chatbots

chat_azure()
Chat with a model hosted on Azure OpenAI
chat_bedrock()
Chat with an AWS bedrock model
chat_claude()
Chat with an Anthropic Claude model
chat_cortex() cortex_credentials()
Create a chatbot that speaks to the Snowflake Cortex Analyst
chat_gemini()
Chat with a Google Gemini model
chat_github()
Chat with a model hosted on the GitHub model marketplace
chat_groq()
Chat with a model hosted on Groq
chat_ollama()
Chat with a local ollama model
chat_openai()
Chat with an OpenAI model
chat_perplexity()
Chat with a model hosted on perplexity.ai
token_usage()
Report on token usage in the current session

Chat helpers

create_tool_def()
Create metadata for a tool
content_image_url() content_image_file() content_image_plot()
Encode image content for chat input
live_console() live_browser()
Open a live chat application
interpolate() interpolate_file()
Helpers for interpolating data into prompts

Tools and structured data

Objects

These classes abstact across behaviour differences in chat providers so that for typical elmer use you don’t need to worry about them. You’ll need to learn more about the objects if you’re doing something that’s only supported by one provider, or if you’re implementing a new provider.

Turn()
A user or assistant turn
Provider()
A chatbot provider
Content() ContentText() ContentImage() ContentImageRemote() ContentImageInline() ContentToolRequest() ContentToolResult()
Content types received from and sent to a chatbot
Chat
A chat