Learn how to build a custom AI chatbot with conversation history. This example uses the AI Chat component for DeepSeek API, but you can switch to other supported models as well (OpenAI, Claude, Gemini). You can create custom chat assistants for tasks like content generation, summarization, and onboarding. The system prompt, model, and context can be dynamically loaded and updated. To get started, fork the template, set up local storage for messages, and add corresponding LLM API credentials.

Chat interfaces powered by AI are transforming how we interact with technology. Whether you’re building a tool for content generation, summarization, or employee onboarding, a custom chat assistant can streamline workflows and enhance user experiences.

This template includes a preconfigured system prompt that helps you write engaging content like blog posts, social media captions, technical guides, and newsletters.

Use Cases

This template is highly versatile and can be adapted for various applications:

  • Content Generation: Create blog posts, social media captions, or marketing copy.
  • Summarization: Condense long articles, reports, or meeting notes.
  • Training & Onboarding: Provide step-by-step guidance for new employees or users.
  • Customer Support: Answer FAQs or troubleshoot issues in real-time.

Key Components

  • AI Chat: Wrapper for streaming AI chat APIs (pick your favorite LLM).
  • Message Input Widget: UI widget for user input.
  • Text Widget: Widget for rendering chat messages.
  • AI Chat Context Store: Stores the conversation history for each user.

How It Works

  • User Input: The user types a query into the Message Input widget.
  • AI Processing: The query is sent to the LLM model via streaming API. Use AI Chat component's settings to configure system prompt, model and other API parameters.
  • Response Rendering: The AI’s response is displayed in the Text widget, formatted in markdown.
  • Session Storage: The chat history is saved in the local KV Store (see AI Chat Context Store group).
Kelp Team
Published on Feb 6, 2025
CATEGORIES
AIRecently AddedKelp Picks ✨
SHARE