Got a big idea? I’m in. Let’s create something extraordinary together.

Phone

+61 40 649 2312

Address

673 La Trobe St, Docklands, VIC 3008

Social Links

Collaborations

Deploying a ChatGPT-Style App with Azure OpenAI + LangChain + Streamlit

Build and deploy a ChatGPT-style AI assistant using Azure OpenAI, LangChain, and Streamlit in just a few steps.

Deploying a ChatGPT-Style App with Azure OpenAI + LangChain + Streamlit

🧠 Goal

Build a web app that interacts with OpenAI’s GPT-4 API using LangChain for prompt chaining and Streamlit for the UI, deployed on Azure.

🛠️ Tech Stack

  • Azure OpenAI Service

  • LangChain

  • Python (FastAPI + Streamlit)

  • Azure Web Apps (for deployment)

🧩 Steps

  • Set Up Azure OpenAI

    1. Go to Azure Portal → Create resource → “Azure OpenAI”.

    2. Deploy a GPT-4 model and note your endpoint and key.

  • Install LangChain & Streamlit

  • pip install langchain streamlit openai
  • .   Create the LangChain Script

  • from langchain.llms import OpenAI
    from langchain.chains import LLMChain
    from langchain.prompts import PromptTemplate
    import os
    os.environ["OPENAI_API_KEY"] = "your-key"
    template = PromptTemplate.from_template("You are an AI assistant. Answer: {question}")
    chain = LLMChain(prompt=template, llm=OpenAI(temperature=0.7))
    def ask_question(q): return chain.run(question=q)
  • Build Streamlit UI

  • import streamlit as st
    st.title("Ask VishGPT")
    user_input = st.text_input("Your Question")
    if st.button("Ask"):
        response = ask_question(user_input)
        st.write(response)
  • Deploy to Azure Web Apps

    • Use Azure CLI or GitHub Actions

    • Add .streamlit/secrets.toml for environment vars

       

Conclusion

Building intelligent web apps powered by large language models has never been more accessible. By combining the power of Azure OpenAI, the flexibility of LangChain, and the simplicity of Streamlit, you can rapidly prototype and deploy real-world AI solutions. Whether you’re enhancing customer experiences or building internal tools, this stack offers a fast track from concept to deployment—secure, scalable, and enterprise-ready. The future of conversational AI is here, and now’s the time to build with it.

JavaScript, Open Source, Full Stack Development
2 min read
Jan 06, 2025
By Vishnu Devarajan
Share

Related posts

Jun 16, 2025 • 4 min read
Tech Problems I’ve Actually Solved – Not Just Talked About

Real-world tech challenges solved through practical architecture, data...

Jun 15, 2025 • 4 min read
Built in the Field – How My Services Grew from Real-World Problems

A real-world guide to tech services built from hands-on experience in...

Feb 22, 2025 • 1 min read
Transforming Trade – Automating Docs with ML & Blockchain

Revolutionised export processes by automating trade documentation with...