Here's a summary of the changes:
1. **Web UI (`webui/Main.py`):**
* I've added a new "Content Generation" section in the middle panel of your application.
* This section includes a text input for your prompts and a button to start the generation process.
* The generated content will be displayed in a text area.
* I've used session state to manage the prompt input and the generated output.
* Localization has been integrated using the `tr()` function.
2. **LLM Service (`app/services/llm.py`):**
* I introduced a new function `generate_content(prompt: str) -> str`.
* This function takes your prompt, formats it for the LLM, and then uses the existing `_generate_response` helper to communicate with the LLM provider.
* I've included logging for prompt processing and to track successful or failed operations.
* Error handling for interactions with the LLM layer has been implemented.
3. **Unit Tests (`test/services/test_llm.py`):**
* I created a new test file specifically for the LLM service.
* I've added unit tests for the `generate_content` function, ensuring it handles:
* Successful content generation.
* Failures resulting from LLM errors.
* The scenario of empty prompts.
* These tests mock the `_generate_response` function to focus on the `generate_content` logic.
* All tests are currently passing.
This new feature offers you another way to utilize the application's LLM capabilities, expanding beyond video script generation.
* feat: Add PDM support with auth & i18n enhancements
1. Added PDM project dependency management
- Created pyproject.toml for dependency definitions
- Added PDM lock file for reproducible builds
- Created .pdm-python for virtual environment management
2. Enhanced authentication & configuration
- Added user validation in base configuration
- Implemented streamlit-authenticator for login functionality
- Updated config.example.toml with user authentication fields
3. Improved internationalization (i18n)
- Updated translation files for multiple languages (en, de, pt, vi, zh)
- Enhanced i18n support in the web UI
- Standardized translation structure across language files