Skip to main content

OpenRouter integration with Plone

Project description

interaktiv.aiclient

Code checks

This is a simple OpenRouter integration for Plone.

Tested for Plone 6.0.15

How to use

To get started, fill in your API key and select a model from the AI Client controlpanel. Available models are fetched from the OpenRouter Models API.

You can then get the AI Client utility and call its call method with a prompt.

from interaktiv.aiclient.client import AIClient
from interaktiv.aiclient.interfaces import IAIClient
from zope.component import getUtility

prompt = [
    {
        "role": "user",
        "content": "Hello World!"
    }
]

ai_client: AIClient = getUtility(IAIClient)
response = ai_client.call(prompt)

For more information on how to construct prompts, please refer to the OpenAI docs.

Adding this add-on to your project

Install the add-on using pip:

pip install interaktiv.aiclient

or if you're using uv:

uv pip install interaktiv.aiclient

Install from source

You can also install the add-on from the source. In your mx.ini file, add:

[interaktiv.aiclient]
url = git@github.com:interaktivgmbh/interaktiv.aiclient.git
rev = v1.0.0
extras = test

Or using https:

[interaktiv.aiclient]
url = https://github.com/interaktivgmbh/interaktiv.aiclient.git
rev = v1.0.0
extras = test

Contribute

License

The project is licensed under GPLv2.

Credits and acknowledgements

Generated using Cookieplone (0.9.10) and cookieplone-templates (eae593d) on 2025-11-21 13:43:16.160908. A special thanks to all contributors and supporters!

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

interaktiv_aiclient-1.0.0.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

interaktiv_aiclient-1.0.0-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file interaktiv_aiclient-1.0.0.tar.gz.

File metadata

  • Download URL: interaktiv_aiclient-1.0.0.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.2 cpython/3.12.3 HTTPX/0.28.1

File hashes

Hashes for interaktiv_aiclient-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c76cc9de1038508198570b8ff1ec6ea85719e55eebc0959934d576a387ab7b96
MD5 318830a9cf9e54d07b2ce52276e516ec
BLAKE2b-256 84a8fce6f455d41e2d63e6087469f331592df91d13d40e9269ef64912b20fd27

See more details on using hashes here.

File details

Details for the file interaktiv_aiclient-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for interaktiv_aiclient-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0dc31baa3774f965b6503ece282f800a4aeee1b57b5ed2582fc7d86e4de2caff
MD5 cca2e8931ffcae975635a3bb03d9c3c8
BLAKE2b-256 744aed3261a4dc5ed75a8c319778e0c8675f406ad7c228961f8bcd0552cf5248

See more details on using hashes here.

Supported by

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