Skip to content
/ ti Public

πŸ™‹β€β™‚οΈ A chatbot designed to enhance Discord question center.

License

Notifications You must be signed in to change notification settings

nauqh/ti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

75 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

T.i. - The Informationist

Version Python Discord OpenAI

About the project

T.i is an AI-powered teaching assistant for Coderschool's Discord forums. It combines OpenAI's GPT models with Discord's interactive features to provide intelligent, contextual assistance to learners.

Key Features

πŸ€– Intelligent Assistance

  • Multi-language support with natural, friendly communication
  • Context-aware responses based on course materials and documentation
  • Smart handling of follow-up questions in thread conversations

πŸ“ Code Analysis

  • GitHub repository integration
  • Automatic code extraction and analysis
  • Support for multiple programming languages
  • Code review and improvement suggestions

πŸ“Š Visual Learning

  • Image analysis for debugging visualizations
  • Error identification in charts and plots
  • Step-by-step guidance for fixing visual issues

πŸŽ“ Educational Resources

  • Automatic YouTube tutorial suggestions
  • Curated educational content recommendations
  • Topic-specific learning materials

πŸ”„ Workflow Integration

  • Seamless Discord thread management
  • Automatic TA tagging for complex queries
  • Real-time feedback collection system
  • Progress tracking and response monitoring

Usage Examples

Code Analysis

# User asks about their GitHub repository
"I'm having trouble with my code at github.com/user/project. Can you help?"

# Bot automatically:
1. Extracts repository details
2. Fetches relevant code
3. Analyzes the implementation
4. Provides targeted feedback

Visual Debugging

# User shares a matplotlib visualization
"Why does my plot look weird?"

# Bot helps by:
1. Analyzing the image
2. Identifying visual issues
3. Suggesting improvements
4. Providing example code fixes

Resource Recommendations

# User asks about a topic
"Can you help me understand pandas DataFrame joins?"

# Bot responds with:
1. Clear explanation
2. Relevant code examples
3. Curated YouTube tutorials
4. Additional learning resources

Interactive Learning

# User continues the conversation
"How can I optimize this query?"

# Bot provides:
1. Step-by-step guidance
2. Performance tips
3. Best practices
4. Links to related tutorials

Project Structure

chatbot/
β”œβ”€β”€ bot/
β”‚   β”œβ”€β”€ extensions/
β”‚   β”‚   └── questions.py    # Discord client implementation
|   β”œβ”€β”€ __init__.py
|   β”œβ”€β”€ __main__.py
|   β”œβ”€β”€ bot.py        
|   β”œβ”€β”€ assistant.py        # Core AI assistant implementation
|   └── tools.py            # Assistant tool definitions
β”œβ”€β”€ docs/                   # Documents for knowledge retrieval
β”œβ”€β”€ data/
β”‚   └── instructions.txt    # Assistant guidelines
β”œβ”€β”€ .env                    # Environment variables
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
└── requirements.txt

Technical Features

AI Integration

  • OpenAI GPT models for natural language understanding
  • Vector store for efficient document search
  • Tool-based architecture for extensibility

Discord Integration

  • Thread-based conversations
  • File and image handling
  • Reaction-based feedback system
  • Role-based access control

Developer Tools

  • GitHub API integration
  • YouTube search capabilities
  • Code analysis tools
  • Documentation search

Workflow

graph TD
    A((On new Message)) --> B(Check if Thread Exists)
    B -->|Yes| C(Add Message to Thread)
    B -->|No| D(Create Thread)
    D --> C
    C --> E(Create Run)
    E --> E'(Process Run)
    E' --> F{Run Status Check}
    F -->|completed| G(Retrieve Response Messages)
    F -->|requires_action| H(Process Required Tool Calls)
    H --> I{Tool Type}
    I -->|GitHub| J(Fetch Repository Code)
    I -->|YouTube| K(Search Videos)
    I -->|Document| L(Send Doc Content)
    J --> E'
    K --> E'
    L --> E'
    F -->|failed| M(Log Error and Exit)

    G --> O{Check Citations}
    O -->|Yes| P(Add Referenced Files)
    O -->|No| Q(Display Response to User)
    P --> Q
    Q --> S(((End)))
Loading

Installation

  1. Clone and setup:
git clone https://github.com/nauqh/ti.git
cd ti
pip install -r requirements.txt
  1. Configure environment:
OPENAI_API_KEY=<Your OpenAI API Key>
DISCORD_TOKEN=<Your Discord Bot Token>
GITHUB_TOKEN=<Your GitHub Personal Access Token>
  1. Run the bot:
python -Om bot

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

License

This project is under the MIT License. See LICENSE for details.

About

πŸ™‹β€β™‚οΈ A chatbot designed to enhance Discord question center.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published