Skip to content

Commit a84e4df

Browse files
committed
wip: initial config layout
1 parent 1b7e589 commit a84e4df

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

config/options.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
'base' => null, // base url for canonical links
7777
'trailingSlash' => false, // whether to add trailing slashes to canonical URLs (except for files)
7878
],
79+
'ai' => require __DIR__ . '/options/ai.php',
7980
'generateSchema' => true, // whether to generate default schema.org data
8081
'locale' => 'en_US', // default locale, used for single-language sites
8182
'dateFormat' => null, // custom date format

config/options/ai.php

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
3+
use tobimori\Seo\Ai\Providers\OpenAi;
4+
5+
return [
6+
'enabled' => true,
7+
8+
/**
9+
* Identifier of the provider entry to use when a task
10+
* does not declare its own provider.
11+
*/
12+
'defaultProvider' => 'openai',
13+
14+
'providers' => [
15+
'openai' => [
16+
'class' => OpenAi::class,
17+
'config' => [
18+
'apiKey' => '', // needs to be defined
19+
'model' => 'gpt-5-mini',
20+
'endpoint' => 'https://api.openai.com/v1/responses',
21+
],
22+
],
23+
'openrouter' => [
24+
'class' => OpenAi::class,
25+
'config' => [
26+
'apiKey' => '', // needs to be defined
27+
'model' => 'openai/gpt-5-mini',
28+
'endpoint' => 'https://openrouter.ai/api/v1/chat/completions',
29+
],
30+
],
31+
],
32+
33+
/**
34+
* Task definitions describe how different jobs should
35+
* call the AI service. Prompts are stored in the translation
36+
* files and referenced by their key.
37+
*/
38+
'tasks' => [
39+
'pageTitle' => [
40+
'provider' => null, // e.g. => 'openai',
41+
'prompt' => 'seo.ai.prompts.pageTitle',
42+
'context' => [],
43+
],
44+
'imageAlt' => [
45+
'provider' => null, // e.g. => 'openai',
46+
'prompt' => 'seo.ai.prompts.imageAlt',
47+
'context' => [],
48+
],
49+
],
50+
];

0 commit comments

Comments
 (0)