Skip to content

Commit a14fcfa

Browse files
committed
Add built-in extensions docs
1 parent 416a706 commit a14fcfa

File tree

3 files changed

+75
-3
lines changed

3 files changed

+75
-3
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: Built-in Extensions
3+
description: Overview of the built-in extensions that provide core functionality without additional dependencies
4+
---
5+
6+
To minimize bloat and ensure a lean functional core, llms .py:
7+
- Maintains a single file [main.py](https://github.com/ServiceStack/llms/blob/main/llms/main.py) core which enables:
8+
- Its [CLI Features](/docs/features/cli)
9+
- Support for Open AI Compatible providers:
10+
- Moonshot AI, Z.ai, Alibaba/Qwen, Groq, xAI, Mistral, Codestral, NVIDIA, GitHub, DeepSeek, Chutes, HuggingFace, OpenRouter, Fireworks AI, Ollama, LM Studio
11+
- Requires only a single **aiohttp** dependency
12+
- Maintains an up-to-date model provider configuration (from models.dev)
13+
- Supports loading extensions for any additional functionality, integrations, and UI features
14+
15+
## Built-in Extensions
16+
17+
All built-in extensions are located in the [llms/extensions](https://github.com/ServiceStack/llms/tree/main/llms/extensions) folder.
18+
They're resolved for generally useful functionality that does not require any additional dependencies.
19+
20+
### [app](https://github.com/ServiceStack/llms/tree/main/llms/extensions/app) extension
21+
22+
Provides core application logic, data persistence (SQLite), and migration from client-side storage
23+
- **Database**: `~/.llms/user/default/app/app.sqlite`
24+
- **request**: Logs all requests for auditing and analytics
25+
- **thread**: Persists chat threads and messages
26+
- [analytics](https://github.com/ServiceStack/llms/tree/main/llms/extensions/analytics): Provides a UI for analytics - using `request` table data in `app.sqlite`
27+
28+
### [gallery](https://github.com/ServiceStack/llms/tree/main/llms/extensions/gallery) extension
29+
30+
A UI and backend for intercepting, storing, and viewing generated assets and uploaded files
31+
- **Database**: `~/.llms/user/default/gallery/gallery.sqlite`
32+
- **media**: Stores metadata for generated assets and uploaded files
33+
34+
### [providers](https://github.com/ServiceStack/llms/tree/main/llms/extensions/providers) extension
35+
36+
Provides support for popular LLM providers requiring custom handling beyond OpenAI-compatible requests:
37+
38+
- [anthropic](https://github.com/ServiceStack/llms/blob/main/llms/extensions/providers/anthropic.py): Integration with Anthropic's Claude models
39+
- [cerebras](https://github.com/ServiceStack/llms/blob/main/llms/extensions/providers/cerebras.py): Integration with Cerebras AI models
40+
- [chutes](https://github.com/ServiceStack/llms/blob/main/llms/extensions/providers/chutes.py): Integration with Chutes.ai for image generation
41+
- [google](https://github.com/ServiceStack/llms/blob/main/llms/extensions/providers/google.py): Integration with Google's Gemini models
42+
- [nvidia](https://github.com/ServiceStack/llms/blob/main/llms/extensions/providers/nvidia.py): Integration with NVIDIA's GenAI APIs
43+
- [openai](https://github.com/ServiceStack/llms/blob/main/llms/extensions/providers/openai.py): Integration with OpenAI's chat and image generation models
44+
- [openrouter](https://github.com/ServiceStack/llms/blob/main/llms/extensions/providers/openrouter.py): Integration with OpenRouter for image generation
45+
46+
### Disable Extensions
47+
48+
Only built-in extensions or extensions in your local `~/.llms/extensions` folder are loaded by default.
49+
To disable built-in extensions or temporarily disable local extensions, add their folder names to your `~/.llms/llms.json`:
50+
51+
```json
52+
{
53+
"disable_extensions": [
54+
"xmas",
55+
"duckduckgo"
56+
]
57+
}
58+
```
59+
60+
Alternatively you can set the `LLMS_DISABLE` environment variable with a comma-separated list of extension names to disable.
61+
62+
```bash
63+
export LLMS_DISABLE="xmas,duckduckgo"
64+
```
65+
66+
### Other Built-in Extensions
67+
68+
- [core_tools](https://github.com/ServiceStack/llms/tree/main/llms/extensions/core_tools) - [Essential tools](/docs/features/core-tools) for file operations, memory persistence, math calculation & safe code execution
69+
- [katex](https://github.com/ServiceStack/llms/tree/main/llms/extensions/katex) 0 Enables rendering of [LaTeX math expressions](/docs/features/katex) in chat responses using KaTeX
70+
- [system_prompts](https://github.com/ServiceStack/llms/tree/main/llms/extensions/system_prompts): Configures a library of over [200+ curated system prompts](/docs/features/system-prompts) accessible from the UI
71+
- [tools](https://github.com/ServiceStack/llms/tree/main/llms/extensions/tools): Provides [Tools UI](/docs/extensions/tools) and Exposes registered tool definitions via an API endpoint

content/docs/extensions/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"defaultOpen": true,
44
"pages": [
55
"index",
6-
"server",
6+
"built-in",
77
"ui",
8+
"server",
89
"tools",
910
"core-tools",
1011
"gemini"

content/docs/v3.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ See [Model Selector](/docs/features/model-selector) docs for more info.
133133

134134
## Rewritten for Extensibility
135135

136-
llms.py has been rewritten from the ground-up with extensibility a **core concept** where all [major UI and Server features](https://github.com/ServiceStack/llms/tree/main/llms/extensions) now layer on their encapsulated functionality by using the public Client & Server Extensibility APIs.
136+
llms.py has been rewritten from the ground-up with extensibility a **core concept** where all [major UI and Server features](/docs/extensions/built-in) now layer on their encapsulated functionality by using the public Client & Server Extensibility APIs.
137137

138-
Extensions are just folders that can add both Server and UI features using the public client and server extensibility APIs. Built-in features are just extensions in the repo's [llms/extensions](https://github.com/ServiceStack/llms/tree/main/llms/extensions) folder which can be overridden by adding them to your local `~/.llms/extensions` folder.
138+
Extensions are just folders that can add both Server and UI features using the public client and server extensibility APIs. [Built-in features](/docs/extensions/built-in) are just extensions in the repo's [llms/extensions](https://github.com/ServiceStack/llms/tree/main/llms/extensions) folder which [can be disabled](/docs/extensions/built-in#disable-extensions) or overridden by adding them to your local `~/.llms/extensions` folder. Too minimize bloat, only features that are generally useful and don't require additional dependencies are included as built-in extensions.
139139

140140
llms includes support for installing and uninstalling extensions from any GitHub repository. For better discoverability, non built-in extensions are maintained in the [github.com/llmspy](https://github.com/orgs/llmspy/repositories) organization repositories which anyone else is welcome to contribute their repos to for increased discoverability.
141141

0 commit comments

Comments
 (0)