mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-08 22:08:03 -05:00
- Add README table-of-contents link for REST API.
- Document REST API server startup and capabilities. - Add endpoint overview for chat, patterns, contexts. - Describe sessions management and model listing endpoints. - Provide curl examples for key API workflows. - Explain Ollama compatibility mode endpoints and port.
This commit is contained in:
23
README.md
23
README.md
@@ -38,6 +38,7 @@
|
||||
[Philosophy](#philosophy) •
|
||||
[Installation](#installation) •
|
||||
[Usage](#usage) •
|
||||
[REST API](#rest-api-server) •
|
||||
[Examples](#examples) •
|
||||
[Just Use the Patterns](#just-use-the-patterns) •
|
||||
[Custom Patterns](#custom-patterns) •
|
||||
@@ -170,6 +171,7 @@ Keep in mind that many of these were recorded when Fabric was Python-based, so r
|
||||
- [Usage](#usage)
|
||||
- [Debug Levels](#debug-levels)
|
||||
- [Extensions](#extensions)
|
||||
- [REST API Server](#rest-api-server)
|
||||
- [Our approach to prompting](#our-approach-to-prompting)
|
||||
- [Examples](#examples)
|
||||
- [Just use the Patterns](#just-use-the-patterns)
|
||||
@@ -299,7 +301,7 @@ docker run --rm -it -v $HOME/.fabric-config:/root/.config/fabric kayvan/fabric:l
|
||||
# Use Fabric with your patterns
|
||||
docker run --rm -it -v $HOME/.fabric-config:/root/.config/fabric kayvan/fabric:latest -p summarize
|
||||
|
||||
# Run the REST API server
|
||||
# Run the REST API server (see REST API Server section)
|
||||
docker run --rm -it -p 8080:8080 -v $HOME/.fabric-config:/root/.config/fabric kayvan/fabric:latest --serve
|
||||
```
|
||||
|
||||
@@ -721,6 +723,25 @@ Fabric supports extensions that can be called within patterns. See the [Extensio
|
||||
|
||||
**Important:** Extensions only work within pattern files, not via direct stdin. See the guide for details and examples.
|
||||
|
||||
## REST API Server
|
||||
|
||||
Fabric includes a built-in REST API server that exposes all core functionality over HTTP. Start the server with:
|
||||
|
||||
```bash
|
||||
fabric --serve
|
||||
```
|
||||
|
||||
The server provides endpoints for:
|
||||
|
||||
- Chat completions with streaming responses
|
||||
- Pattern management (create, read, update, delete)
|
||||
- Context and session management
|
||||
- Model and vendor listing
|
||||
- YouTube transcript extraction
|
||||
- Configuration management
|
||||
|
||||
For complete endpoint documentation, authentication setup, and usage examples, see [REST API Documentation](docs/rest-api.md).
|
||||
|
||||
## Our approach to prompting
|
||||
|
||||
Fabric _Patterns_ are different than most prompts you'll see.
|
||||
|
||||
Reference in New Issue
Block a user