File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 "bakerydemo.locations" ,
4545 "bakerydemo.recipes" ,
4646 "bakerydemo.search" ,
47+ "wagtail_ai" ,
4748 "wagtail.embeds" ,
4849 "wagtail.sites" ,
4950 "wagtail.users" ,
222223
223224ADMIN_PASSWORD = os .environ .get ("ADMIN_PASSWORD" , "changeme" )
224225
226+ # Wagtail AI settings
227+ # https://wagtail-ai.readthedocs.io
228+
229+ WAGTAIL_AI = {
230+ "BACKENDS" : {
231+ "default" : {
232+ "CLASS" : "wagtail_ai.ai.llm.LLMBackend" ,
233+ "CONFIG" : {
234+ # Model ID recognizable by the "LLM" library.
235+ "MODEL_ID" : os .environ .get (
236+ "WAGTAIL_AI_DEFAULT_MODEL_ID" , "gpt-4.1-mini"
237+ ),
238+ "TOKEN_LIMIT" : int (
239+ os .environ .get ("WAGTAIL_AI_DEFAULT_TOKEN_LIMIT" , 4096 )
240+ ),
241+ },
242+ },
243+ "vision" : {
244+ "CLASS" : "wagtail_ai.ai.openai.OpenAIBackend" ,
245+ "CONFIG" : {
246+ "MODEL_ID" : os .environ .get (
247+ "WAGTAIL_AI_VISION_MODEL_ID" , "gpt-4.1-mini"
248+ ),
249+ "TOKEN_LIMIT" : int (
250+ os .environ .get ("WAGTAIL_AI_VISION_TOKEN_LIMIT" , 300 )
251+ ),
252+ },
253+ },
254+ },
255+ "IMAGE_DESCRIPTION_BACKEND" : "vision" ,
256+ }
257+ WAGTAILIMAGES_IMAGE_FORM_BASE = "wagtail_ai.forms.DescribeImageForm"
258+
259+
225260# Content Security policy settings
226261# http://django-csp.readthedocs.io/en/latest/configuration.html
227262
Original file line number Diff line number Diff line change 11Django>=5.2,<5.3
22django-dotenv==1.4.2
33wagtail>=7.1,<7.2
4+ wagtail-ai
45wagtail-font-awesome-svg>=1,<2
56django-debug-toolbar>=4.2,<5
67django-extensions==3.2.3
You can’t perform that action at this time.
0 commit comments