Skip to content

Commit 16aefe1

Browse files
committed
Readme
1 parent 07e4443 commit 16aefe1

File tree

1 file changed

+4
-31
lines changed

1 file changed

+4
-31
lines changed

README.md

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Mock LLM Server
22

3-
A FastAPI-based mock LLM server that mimics OpenAI's API format. Instead of calling an actual language model, it uses predefined responses from a YAML configuration file.
3+
A FastAPI-based mock LLM server that mimics OpenAI's API format. Instead of calling an actual language model, it uses predefined responses from a YAML configuration file. Made for when you want a deterministic response for testing or development purposes.
4+
5+
I wrote this for the CodeGate project, to mock out certain responses to develop, test and validate certain features. Check it out [here](https://github.com/stacklok/codegate).
46

57
## Features
68

@@ -12,21 +14,6 @@ A FastAPI-based mock LLM server that mimics OpenAI's API format. Instead of call
1214
- Error handling
1315
- Mock token counting
1416

15-
## Project Structure
16-
17-
```
18-
mockllm/
19-
├── src/
20-
│ └── mockllm/
21-
│ ├── __init__.py
22-
│ ├── config.py # Response configuration management
23-
│ ├── models.py # Pydantic models
24-
│ └── server.py # FastAPI server implementation
25-
├── main.py # Entry point
26-
├── requirements.txt # Project dependencies
27-
├── responses.yml # Response configurations
28-
└── README.md # Documentation
29-
```
3017

3118
## Installation
3219

@@ -177,22 +164,8 @@ The server includes comprehensive error handling:
177164

178165
## Logging
179166

180-
The server uses JSON-formatted logging for better integration with log management systems. Logs include:
167+
The server uses JSON-formatted logging
181168

182169
- Incoming request details
183170
- Response configuration loading
184171
- Error messages and stack traces
185-
186-
## Development
187-
188-
To run the server in development mode with auto-reload:
189-
```bash
190-
python main.py
191-
```
192-
193-
## API Documentation
194-
195-
FastAPI automatically generates API documentation. Once the server is running, visit:
196-
197-
- Swagger UI: `http://localhost:8000/docs`
198-
- ReDoc: `http://localhost:8000/redoc`

0 commit comments

Comments
 (0)