Catalog PyPI
Back to packageRELEASE DETAILS

0.1.6

PyPI

aidu-ai-llm

LLM abstraction layer for the AIDu ecosystem.

Published10 Jun 2026
Direct dependencies11
Transitive dependenciesNot calculated

README

Version 0.1.6 documentation

aidu-ai-llm

Small Python LLM playground from PHBern to help people to understand how to build AI-Tutors

with:

  • reusable LLM utilities under src/aidu/ai/llm
  • a FastAPI chat backend in serve/app.py
  • a minimal Vite frontend in web/

Quick Example

pip install aidu-ai-llm aidu-support

then run the example app:

aidu-ai-llm-example

Development Prerequisites

The following tools are required to build and run the project:

  • make — for running common development and build tasks
  • Python (>=3.11) — backend runtime
  • uv (latest) — Python package manager and environment runner
  • Node.js (>=18, includes npm) — required to build the frontend (TypeScript via Vite)

💡 Notes

  • uv replaces pip, venv, etc. → state of the art: no manual environment activation needed
  • npm is included with Node.js, so you don’t need to install it separately

Quick Start

Copy .env_example to .env and add your OpenAI Token there.

When you have ensured the prerequisites, this should work. Clean up, install dependencies, build frontend, and run the server:

make clean          # clean up python backend and web frontend
make web.install    # install web frontend dependencies
make web.build      # build web frontend
make install        # install python dependencies
make serve          # run FastAPI server

Open: http://localhost:8000

Then you can interact with the chat interface.

Chat interface screenshot

Project Layout

serve/
  app.py                 FastAPI app (chat/session endpoints + static web mount)

src/aidu/ai/llm/
  client.py              OpenAI client wrapper
  requester.py           Base class interacting with ai client
  builder.py             Prompt template builder
  safeformat.py          Safe string formatting helpers
  tool_registry.py       Tool registration/execution helpers
  spec.py                Plugin spec definitions
  evaluator.py           Evaluator overloads Requestor

test/
  curl_tests.sh          Curl-based API smoke checks

web/
  index.html             Chat page shell
  src/main.ts            Browser chat logic
  HELP.md                License/help notes

Useful Commands

make smoke.client       # runs smoke test on a individual file
make smoke.requester    # runs smoke test on a individual file
make smoke.actor        # runs smoke test on a individual file
make serve              # run FastAPI server
make curl               # run curl tests against above server

cd web && make clean    # clean up web frontend
cd web && make install  # install frontend deps
cd web && make build    # build frontend

Notes

  • Requires OPENAI_API_KEY in your environment (or .env).
  • The frontend talks to the backend session endpoints under /sessions/....

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 11

Native requirements
11 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
aidu-support
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
aidu-supportruntime
fastapi
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
fastapi>=0.110.0runtime
google-genai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
google-genai>=0.3.0runtime
openai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
openai<2.0.0,>=1.0.0runtime
pluggy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
pluggy>=1.0runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.0runtime
python-dotenv
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
python-dotenv<1.0.0,>=0.19.0runtime
requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
requests>=2.31.0runtime
rich
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
rich>=14.3.2runtime
sympy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
sympy>=1.11.0runtime
uvicorn
Environment
{
  "extras": "standard",
  "marker": null,
  "requires_python": "<3.15,>=3.11",
  "evaluation": "NOT_EVALUATED"
}
uvicorn[standard]>=0.29.0runtime

Distribution files

2 collected
aidu_ai_llm-0.1.6-py3-none-any.whl

bdist_wheel · 1,043.83 KB · Python py3

Source file
aidu_ai_llm-0.1.6.tar.gz

sdist · 992.16 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:34 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:bc8f58da85aea76cdf076a325368d00d8efa266dd4aa257360f1abfc0b1030e4

Other collected versions

View all collected versions →