Skip to main content

cedric-ai

cedric-ai est une bibliothèque Python qui te permet d'interagir avec Cédric, une intelligence artificielle conversationnelle rapide, sans filtre et disponible à la demande.

Cédric répond à tes questions, discute de n'importe quel sujet, génère du texte, et s'adapte à n'importe quelle personnalité que tu lui donnes. La lib gère automatiquement les cas où le serveur est temporairement hors ligne grâce à un système de file d'attente persistante — tes requêtes ne sont jamais perdues.


Installation

pip install cedric-ai

Aucune dépendance externe sauf requests. Compatible Python 3.8+.


Accès & Limites

  • Aucun token requis — l'accès est identifié par ton adresse IP automatiquement
  • 500 requêtes gratuites par jour par adresse IP
  • Au-delà du quota, les requêtes sont mises en file et traitées le lendemain
  • Aucune inscription, aucune clé API à gérer

Démarrage rapide

from cedric_ai import CedricAI

ai = CedricAI()
reponse = ai.ask("C'est quoi Python ?")
print(reponse)

Guide complet

Requête directe

from cedric_ai import CedricAI

ai = CedricAI()
reponse = ai.ask("Explique moi la gravité en deux phrases")
print(reponse)

Attendre max 5 minutes si hors ligne :

reponse = ai.ask("Bonjour !", max_wait=300)

Ne pas attendre :

reponse = ai.ask("Bonjour !", wait_if_offline=False)

Requête asynchrone avec file d'attente

job_id = ai.ask_async("Écris moi un poème sur la pluie")
result = ai.wait_for_result(job_id, timeout=600)
print(result)

Vérifier sans bloquer

result = ai.get_result(job_id)
if result is None:
    print("Pas encore prêt...")
else:
    print(result)

Callback

def quand_ca_repond(job_id, reponse):
    print(f"[{job_id}] {reponse}")

ai.ask_async("Donne moi 5 idées", callback=quand_ca_repond)

Personnalité personnalisée

ASSISTANT = "Tu es un assistant RH professionnel. Tu réponds de manière formelle."
reponse = ai.ask("Rédige une offre d'emploi Python senior", system=ASSISTANT)

Quota restant

print(ai.quota())
# {"ip": "...", "used": 12, "remaining": 488, "limit": 500}

Statut de la file

print(ai.queue_status())
# {"online": True, "pending": 2, "done": 8, "errors": 0, "total": 10}

ai.clear_done()

Gestion des erreurs

try:
    reponse = ai.ask("Bonjour", wait_if_offline=False)
except ConnectionError:
    print("Serveur indisponible")
except PermissionError:
    print("Quota de 500 requêtes/jour atteint")
except TimeoutError:
    print("Timeout dépassé")

Exemple complet — chatbot CLI

from cedric_ai import CedricAI

ai = CedricAI()
print("Tape 'exit' pour quitter\n")

while True:
    question = input("Toi : ").strip()
    if question.lower() == "exit":
        break
    try:
        print(f"Cédric : {ai.ask(question)}\n")
    except PermissionError:
        print("⚠️ Quota atteint\n")
    except TimeoutError:
        print("⏱️ Serveur indisponible\n")

Licence

MIT

Metadata

Release files for cedric-ai 7.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cedric-ai 7.0.0
File Size Uploaded Provenance Actions
cedric_ai-7.0.0.tar.gz 6.6 kB Without provenance Details for cedric_ai-7.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cedric-ai 7.0.0
File Interpreter ABI Platform Actions
cedric_ai-7.0.0-py3-none-any.whl Python 3 none any Details for cedric_ai-7.0.0-py3-none-any.whl

Total release size: 13.5 kB

Release files / cedric_ai-7.0.0.tar.gz

Download URL cedric_ai-7.0.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
550a36a03e2c4e99c4eb7581d49e67ea0b33251e870a82fe9f4d90b9a94a481c
BLAKE2b-256 checksum
How to use checksums
6c0ba798c4c4ba99071318af6b2f1e01ea52d807eeeec71e0a9f41de0d903d76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / cedric_ai-7.0.0-py3-none-any.whl

Download URL cedric_ai-7.0.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d729eba04a64aeb7a8c2ad1572ed2d2f883f90c5026f10cb4e664f6a4b4628b9
BLAKE2b-256 checksum
How to use checksums
dd2fde0d6466e3dd18ef6a3049507c608685f24c8981b030d2dfe0fc736472d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for cedric-ai 7.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page