Skip to main content

Get a hand writing your content with AI super powers!

Project description

wagtail-ai

Wagtail AI

Get help with your content using AI superpowers.

License: MIT PyPI version ai CI

Wagtail AI integrates Wagtail with AI's APIs (think ChatGPT) to help you write and correct your content.

Right now, it can:

  • Finish what you've started - write some text and tell Wagtail AI to finish it off for you
  • Correct your spelling/grammar
  • Let you add your own custom prompts
  • Automatically generate alt-tags for your uploaded images
  • Work with multiple LLM providers including local models, OpenAI, Mistral, Claude and many others

Demos

Rich-text integration

https://user-images.githubusercontent.com/27112/223072938-8cb5ccff-4835-489a-8be4-cca85001885e.mp4

Alt-text generation

https://github.com/wagtail/wagtail-ai/assets/27617/5ffd5493-b39c-4d38-bed8-fdd243920eb5

Requirements & Costs

Wagtail AI supports many different LLMs, with OpenAI models available by default. To use these, you'll need an OpenAI account and an API key. There'll also be some cost involved.

For the OpenAI API used here (gpt-3.5-turbo), the cost is

  • $0.0005 per 1000 tokens for input tokens (prompt)
  • $0.0015 per 1000 tokens for output tokens (answer)

Here is an estimated cost breakdown for the correction prompt on a 1000-word paragraph.

We assume that:

  • Prompt is 30 words and the existing paragraph is 1000 words (Input)
  • Each word is 1.3 tokens (Tokens multiplier)
  • We get back 1000 words back (Output)

Then:

  • Input tokens : (35 + 1000) x 1.3 = 1345.5 tokens.
  • Output tokens : 1000 x 1.3 = 1300
  • Input tokens cost : 1345.5 / 1000 * $0.0005 = $0.00067275
  • Output tokens cost : 1300 / 1000 * $0.0015 = $0.00195
  • Total cost : $0.00262275

Links

Supported Versions

  • Wagtail 5.2
  • Django 4.2
  • Python 3.11

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtail_ai-2.1.1.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

wagtail_ai-2.1.1-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file wagtail_ai-2.1.1.tar.gz.

File metadata

  • Download URL: wagtail_ai-2.1.1.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for wagtail_ai-2.1.1.tar.gz
Algorithm Hash digest
SHA256 66d1e1f61ce43dd1df9536e08b74791923ac3e8f71e214e8d3d15636f3997344
MD5 ad46c233be15da04a21171b549812652
BLAKE2b-256 2658b288df6f1ba104e0eb4d5ee24268a5b740dc749a086a3305794469e868f1

See more details on using hashes here.

File details

Details for the file wagtail_ai-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: wagtail_ai-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for wagtail_ai-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1739f4bc1ee354f86824b2e1fc73012cfaf672a6eef0e473385c708c03a6589
MD5 54335fe5d82f3b1f8fdf6b5a92b2fea0
BLAKE2b-256 e8b4d7e9a24343488a9e6dcd6fe06d744fdbaaca56d4bdb325d734708d0dac73

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page