A Python command-line tool for extracting and exporting feedback data from Open WebUI instances.
- Extract feedback data from Open WebUI API
- Export to Excel (.xlsx) format
- Display feedback in text format
- Include user information (when available)
- Include chat conversation data
- Filter feedback by rating (exclude unrated feedback)
- Support for custom SSL verification settings
- Python 3.11 or higher
- Access to an Open WebUI instance with API access
- Bearer token for authentication
-
Clone this repository:
git clone <repository-url> cd open-webui-feedback -
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt
-
Copy the example environment file:
cp .env.example .env -
Edit
.envfile with your Open WebUI instance details:BASE_URL=https://your-openwebui-instance.com BEARER_TOKEN=your_bearer_token_here VERIFY_SSL=true
BASE_URL: The base URL of your Open WebUI instance (required)BEARER_TOKEN: Your authentication bearer token (required)VERIFY_SSL: Whether to verify SSL certificates (default: true)
The tool provides a command-line interface with the following options:
Extract feedback to Excel file:
python main.py extract --xls --user --chat --everythingDisplay feedback in text format:
python main.py extract --text --user --chat--file: Specify output file name (default: feedback.xlsx)--xls: Export to Excel format--text: Display in text format--user: Include user information (name and role)--chat: Include chat conversation data--everything: Include feedback without ratings
The Excel file contains the following columns:
Basic Information:
- Id: Feedback ID
- Chat id: Associated chat ID
- Message id: Associated message ID
- Model: AI model used
- Rating: User rating (if provided)
- Reason: Feedback reason
- Comment: User comment
- Created at: Creation timestamp
User Information (with --user flag):
- Name: User name
- Role: User role
Chat Information (with --chat flag):
- Chat title: Title of the conversation
- User message: User's message content
- Assistant message: AI assistant's response
Displays feedback information in a structured text format with color-coded sections.
The tool includes comprehensive error handling for:
- Missing environment variables
- API connection issues
- Invalid SSL certificates
- Malformed API responses
- File writing errors
- click: Command-line interface
- pandas: Data manipulation and Excel export
- requests: HTTP API calls
- python-dotenv: Environment variable management
- openpyxl: Excel file support
- urllib3: HTTP utilities
This project is licensed under the terms specified in LICENSE.txt.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
If you encounter SSL certificate errors, you can disable SSL verification by setting:
VERIFY_SSL=falseEnsure your bearer token is valid and has the necessary permissions to access the feedback API endpoints.
Verify that:
- Your BASE_URL is correct and accessible
- The Open WebUI instance is running
- Network connectivity is available