File size: 3,410 Bytes
5db9875
d1b7767
 
5db9875
 
 
d1b7767
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5db9875
d1b7767
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
title: cedric-agent
app_file: app.py
sdk: gradio
sdk_version: 5.39.0
---
# Cedric Agent - Personal AI Chatbot

A personal AI chatbot that represents Cedric Laridon on his website, answering questions about his career, background, skills, and experience.

## Features

- **Personal AI Assistant**: Acts as Cedric Laridon, answering questions about his professional background
- **LinkedIn Integration**: Uses Cedric's LinkedIn profile data to provide accurate responses
- **Contact Recording**: Captures visitor contact information and unknown questions via Pushover notifications
- **Web Interface**: Clean Gradio interface for easy interaction
- **Professional Engagement**: Designed to engage potential clients and employers

## Setup

### Prerequisites

- Python 3.12 or higher
- [uv](https://docs.astral.sh/uv/) (recommended) or pip
- OpenAI API key
- Pushover account (optional, for notifications)

### Installation

1. Clone the repository:
```bash
git clone https://github.com/cedriclaridon/cedric-agent.git
cd cedric-agent
```

2. Install dependencies using uv (recommended):
```bash
uv sync
```

   Or using pip:
```bash
pip install -r requirements.txt
```

3. Create a `.env` file in the root directory with your API keys:
```env
OPENAI_API_KEY=your_openai_api_key_here
PUSHOVER_TOKEN=your_pushover_token_here
PUSHOVER_USER=your_pushover_user_key_here
```

### Running the Application

Using uv (recommended):
```bash
uv run python app.py
```

Or using python directly:
```bash
python app.py
```

The application will launch a Gradio interface, typically accessible at `http://localhost:7860`.

## Configuration

### Environment Variables

- `OPENAI_API_KEY`: Required. Your OpenAI API key for GPT-4o-mini
- `PUSHOVER_TOKEN`: Optional. Pushover application token for notifications
- `PUSHOVER_USER`: Optional. Pushover user key for notifications

### Personal Data

The chatbot uses two main sources of personal information:

1. **`me/summary.txt`**: A brief personal summary
2. **`me/cedric-linkedin.pdf`**: LinkedIn profile export in PDF format

Update these files with your own information to customize the chatbot for your use.

## How It Works

1. **System Prompt**: The chatbot is given a comprehensive system prompt that includes personal summary and LinkedIn data
2. **Function Calling**: Uses OpenAI's function calling to record user details and unknown questions
3. **Notifications**: Sends real-time notifications via Pushover when users provide contact info or ask unknown questions
4. **Conversation Flow**: Designed to engage users and encourage them to provide contact information

## Customization

To adapt this chatbot for your own use:

1. Replace `me/summary.txt` with your personal summary
2. Replace `me/cedric-linkedin.pdf` with your LinkedIn profile PDF
3. Update the name in `app.py` (line 80: `self.name = "Your Name"`)
4. Modify the system prompt in the `system_prompt()` method if needed
5. Update the contact information in this README

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contributing

This is a personal project, but feel free to fork it and adapt it for your own use. If you have suggestions for improvements, please open an issue.

## Contact

For questions about this project, please contact Cedric Laridon through the chatbot interface or via the contact methods provided on his website.