ITSulu Blog Publisher Odoo addon
Implement LLMRouter class and all LLM provider classes to make tests pass: Core implementation: - Create ProviderResponse dataclass for provider returns (text, tokens_used) - Update LLMRouter to unpack ProviderResponse objects - Implement all 4 providers to return ProviderResponse: * AnthropicProvider - calls Anthropic API with structured JSON prompts * OpenAIProvider - calls OpenAI /v1/chat/completions endpoint * GeminiProvider - calls Google Gemini generateContent API * OllamaProvider - calls Ollama native or OpenAI-compatible endpoints Router features: - Validates provider at init time, raises UserError for unknown providers - Reads API keys from ir.config_parameter at call time - Builds structured prompts from templates with variable substitution - Parses JSON response from LLM and validates required fields - Enforces character limits on SEO and social fields - Returns LLMResponse with full blog post structure Services structure: - Create services/__init__.py with exports - Create models/__init__.py with exports - Create tests/__init__.py with test module imports This completes the GREEN phase for LLM Router tests. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| addons/itsulu_blog_publisher | ||
| templates | ||
| .gitlab-ci.yml | ||
| ARCHITECTURE.md | ||
| CLAUDE.md | ||
| LICENCE | ||
| main.py | ||
| README.md | ||
Gitlab component template
Components
<Component-name>
Use this component to <component-description>.
To add this component to your CI/CD pipeline, add the following include entry to your project's CI/CD configuration:
include:
- component: https://gitlab.com/<your project path>/<name of your template>@<tag>
Where <tag> is the release tag you want to use (releases list).
Inputs
The template contains some optional inputs:
| Input | Default value | Description |
|---|---|---|
job_name |
job-template |
The job name. |
image |
busybox:latest |
The container image to use to run the job. |
stage |
test |
The stage name for the job. |
Documentation
This project includes a MVC structure to help you get started with Gitlab CI/CD components. The template provides the basic file structure to create your own single component. This project should be public, or one of the jobs in the project's pipeline won't work.
Licence
The licence can be changed. By default this project has the MIT Licence.