Skip to main content

cloooooo — SGLang + RAG hybrid + tools + router + structured outputs + eval

Project description

clovis

Client Python personnel pour un LLM local via Ollama. Interface ultra-simple : prompt, negative_prompt, thinking, context.

Install

pip install clovis

Usage

from clovis import cloooooo

ai = cloooooo()

# Appel direct
print(ai("Explique les trous noirs"))

# Avec options
print(ai(
    "Génère un poème sur la mer",
    negative_prompt="pas de rimes",
    thinking=True,
    context="Tu es un poète du 19e siècle.",
))

# Streaming token par token
for token in ai.stream("Raconte une histoire courte"):
    print(token, end="", flush=True)

# Conversation avec mémoire
conv = ai.conversation(context="Tu es un expert en finance.")
conv("Explique le CAPM")
conv("Et ses limites ?")  # se souvient de la réponse précédente

CLI

clovis "Explique les trous noirs"           # question directe
clovis "Génère un poème" --no "sans rimes"  # avec negative prompt
clovis "Résous ce problème" --think          # mode réflexion
clovis repl                                  # conversation interactive
clovis serve --port 8000                     # démarre le serveur API

API server

clovis serve --port 8000 --key sk-montoken

Requête :

curl -X POST http://localhost:8000/ia \
  -H "Authorization: Bearer sk-montoken" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Bonjour !", "thinking": false}'

Réponse : {"response": "Bonjour ! Comment puis-je t'aider ?"}

Streaming : ajouter "stream": true → réponse en text/plain token par token.

Config

export CLOVIS_MODEL="qwen3-72b-q5km"        # modèle Ollama
export CLOVIS_OLLAMA_URL="http://localhost:11434"
export CLOVIS_API_KEY="sk-..."              # clé API pour le serveur

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

clovis-0.5.0.tar.gz (119.8 kB view details)

Uploaded Source

Built Distribution

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

clovis-0.5.0-py3-none-any.whl (92.2 kB view details)

Uploaded Python 3

File details

Details for the file clovis-0.5.0.tar.gz.

File metadata

  • Download URL: clovis-0.5.0.tar.gz
  • Upload date:
  • Size: 119.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for clovis-0.5.0.tar.gz
Algorithm Hash digest
SHA256 2ae940927aad9cf3a50334d3ad49ea30826c215354ab671284ee1a6a30a0dc12
MD5 762ecb61dcaeb08589322c74e592d84b
BLAKE2b-256 065a247e8fc1b2df2c65bcacb2cc45f11a51449eaefb3bb1111ba88fdf1a9aac

See more details on using hashes here.

File details

Details for the file clovis-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: clovis-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 92.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for clovis-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9be3b4ed78e99da8821d3451b6f347df011d22a3ba1e663f5ef97246e046bc55
MD5 1947c744b7fce34a21bff77c036e6e8d
BLAKE2b-256 1a30e4bce1dfe3ad760f6af2fdb384b9a6a813b07730ecb7582d83c2593a67d2

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