Publish any app, at any scale. Sign up to get the playbook.

Anthropic, OpenAI, and Gemini in a Python Data App

play-icon

Meet the Speaker

Austin Kiesewetter

Austin Kiesewetter

Austin Kiesewetter is a Plotly community member and software engineer at Martin Engineering.

This video walks through how to integrate multiple AI models into a Plotly Dash application. The demo is built around a simple AI chat platform that connects to providers such as Gemini, Claude, and ChatGPT. Each provider can be selected in the app, and the video shows sample prompts and responses. For instance, Gemini is asked about the popularity of Plotly and Dash, returning details about downloads, job market demand, and community activity. ChatGPT is tested with a question about Python’s growth, highlighting ecosystem expansion and increased adoption.

The technical walkthrough covers how the data app is structured and deployed. Key points include:

  • Using API keys for Gemini, Anthropic Claude, and OpenAI, managed securely through environment variables rather than exposing them in public code.
  • Installing SDKs via pip for each provider, such as google-gemini, anthropic, and openai.
  • Writing dedicated functions for each API call, passing prompts and returning formatted responses.
  • Handling model selection dynamically through Dash UI components like segment controls and prompt input fields.
  • Implementing a callback tied to a send button that triggers the API request and displays results.
  • Adding features like loading indicators to improve usability and error handling for empty or failed prompts.

The example shows how to set up a clean workflow that blends Dash layouts, environment management, and API integrations. Viewers are encouraged to build their own applications with small budgets, experiment with different models, and grow their skills in the analytics app ecosystem.

Watch the video to follow along and see the full demo in action.

Related Videos

Bluesky icon
X icon
Instagram icon
Youtube icon
Medium icon
Facebook icon

Product

© 2025
Plotly. All rights reserved.
Cookie Preferences