Skip to content
flydev-frPublic

About

Pascal libraries for building AI applications on mORMot 2: a multi-provider LLM SDK (OpenAI, Anthropic, Gemini) and a pgvector RAG stack.

Topics

Resources

Stars

9 stars

Watchers

1 watching

Forks

Repository files navigation

mormot.ai

Two independent Pascal libraries for building AI applications on top of mORMot 2. They share no code and no dependency — pick one, or use both in the same program.

mormot.ai.sdk

The LLM client: one API for OpenAI, Anthropic and Gemini. Chat, SSE streaming, tool calling, cost tracking, a multi-deployment router with fallback, and an OpenAI-compatible proxy server. Ported from the LiteLLM Python SDK to mormot.ai.litellm.* units.

Switch provider by changing one string: LLM.Chat('openai/gpt-4o', Messages) -> LLM.Chat('anthropic/claude-sonnet-4-20250514', Messages).

Start here — or jump to the API reference.

mormot2-pgvector

The retrieval half: vector search and RAG over Pascal source code, using PostgreSQL + pgvector and a local Ollama embedder. Ships a chunker, a hybrid retriever (cosine + tsvector), a RAG orchestrator, and three CLI programs.

Start here — or read the RAG primer first.

Which one do I need

I want to... Use
Call an LLM from Pascal mormot.ai.sdk
Swap providers without rewriting code mormot.ai.sdk
Expose an OpenAI-compatible endpoint mormot.ai.sdk (proxy)
Search my own corpus by meaning mormot2-pgvector
Ground answers in my own code/documents mormot2-pgvector (retrieval) + mormot.ai.sdk (generation)

Status

Both projects are published and working, but under active development. The documentation tracks the code closely rather than exactly: expect a few gaps between what is written here and the very latest commit. Issues and PRs welcome.

License

Copyright (C) 2026 flydev. Both libraries are released under the same disjunctive three-license as mORMot 2 — your choice of MPL 1.1, GPL 2.0 or later, or LGPL 2.1 or later with the FPC modified-LGPL linking exception:

SPDX-License-Identifier: MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later

Full terms in LICENSE.md. Both build on mORMot 2, Copyright (C) 2026 Arnaud Bouchez, which is a separate dependency under its own license — please credit https://synopse.info if you ship a binary.

About

Pascal libraries for building AI applications on mORMot 2: a multi-provider LLM SDK (OpenAI, Anthropic, Gemini) and a pgvector RAG stack.

Topics

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages