Skip to content

Commit 7587ff0

Browse files
committed
update README
1 parent fadb826 commit 7587ff0

File tree

1 file changed

+74
-10
lines changed

1 file changed

+74
-10
lines changed

README.md

Lines changed: 74 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,92 @@
33
[![npm version](https://badge.fury.io/js/%40lazydynamics%2Frxinfer-client.svg)](https://badge.fury.io/js/%40lazydynamics%2Frxinfer-client)
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
55

6-
A TypeScript SDK for interacting with RxInferServer, providing type-safe access to all server endpoints and features.
6+
A TypeScript client for interacting with RxInferServer, providing type-safe access to its API endpoints.
7+
8+
## About RxInferServer
9+
10+
RxInferServer is a Julia-based server that provides an API for performing probabilistic inference using the RxInfer.jl package. This client library allows you to interact with RxInferServer from TypeScript/JavaScript applications.
11+
12+
### Key Features of RxInferServer
13+
- Probabilistic inference using message passing
14+
- Support for various probabilistic models
15+
- RESTful API interface
16+
- Real-time inference capabilities
717

818
## Installation
919

1020
```bash
1121
npm install @lazydynamics/rxinfer-client
1222
```
1323

14-
## Documentation
24+
## Usage
25+
26+
```typescript
27+
import { RxInferClient, pingServer } from '@lazydynamics/rxinfer-client';
1528

16-
For detailed documentation and getting started guide, please visit our [official documentation](https://lazydynamics.github.io/RxInferClient.js/).
29+
// Create a client instance
30+
const client = await RxInferClient.create();
1731

18-
The documentation includes:
19-
- Getting Started Guide
20-
- API Reference
21-
- Examples and Use Cases
22-
- Best Practices
23-
- Troubleshooting
32+
// Use the client to interact with RxInferServer
33+
const response = await pingServer({ client });
34+
console.log(response.data); // { status: 'ok' }
35+
```
2436

2537
## Development
2638

27-
For information about developing this package, please see our [Contributing Guide](CONTRIBUTING.md).
39+
### Prerequisites
40+
- Node.js (LTS version recommended)
41+
- RxInferServer running locally or accessible via network
42+
43+
### Setting up RxInferServer
44+
1. Clone the RxInferServer repository:
45+
```bash
46+
git clone https://github.com/lazydynamics/RxInferServer.git
47+
cd RxInferServer
48+
```
49+
50+
2. Build and start the server:
51+
```bash
52+
make docker
53+
make dev
54+
```
55+
56+
This will start RxInferServer on `http://localhost:8000`.
57+
58+
### Building the Client
59+
1. Install dependencies:
60+
```bash
61+
npm install
62+
```
63+
64+
2. Generate TypeScript client from OpenAPI specification:
65+
```bash
66+
npm run generate
67+
```
68+
69+
3. Build the package:
70+
```bash
71+
npm run build
72+
```
73+
74+
### Running Tests
75+
```bash
76+
npm test
77+
```
78+
79+
Note: Tests require RxInferServer to be running locally.
80+
81+
## Documentation
82+
83+
Generate and view documentation:
84+
```bash
85+
npm run docs
86+
npm run docs:serve
87+
```
88+
89+
## Contributing
90+
91+
See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to this project.
2892

2993
## License
3094

0 commit comments

Comments
 (0)