File size: 1,443 Bytes
b118dca
0fbed87
 
 
 
 
 
b118dca
 
0fbed87
b118dca
 
0fbed87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
title: Claude Simple Chatbot
emoji: 🤖
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.34.0
app_file: app.py
pinned: false
license: mit
---

# Claude Simple Chatbot 🤖

A simple, elegant chatbot built with Streamlit and Anthropic's Claude AI.

## Features

- **Multiple Claude Models**: Choose between Haiku, Sonnet, and Opus
- **Persistent Chat History**: Conversations stay active during your session
- **Clean Interface**: Modern, responsive design with sidebar controls
- **Easy Setup**: Just add your API key and start chatting
- **Model Selection**: Switch between different Claude models on the fly

## How to Use

1. **Enter API Key**: Add your Anthropic API key in the sidebar
2. **Choose Model**: Select your preferred Claude model
3. **Start Chatting**: Type your message and enjoy!

## Getting Your API Key

- Visit [Anthropic Console](https://console.anthropic.com/)
- Create an account and get your API key
- It should start with `sk-ant-`

## Example Prompts

- "Explain quantum computing in simple terms"
- "Write a Python function to sort a list"
- "Help me plan a weekend itinerary for Tokyo"
- "What are the pros and cons of remote work?"

## Architecture

- **Frontend**: Streamlit for the web interface
- **Backend**: Anthropic Python SDK for Claude API integration
- **State Management**: Streamlit session state for chat history
- **Error Handling**: Graceful error messages and connection handling