Skip to content

Commit 9c8bbc3

Browse files
committed
docs: Update main function to return GatewayError instead of Box<dyn Error>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
1 parent 78a45fb commit 9c8bbc3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ Run `cargo add inference-gateway-sdk`.
2323

2424
```rust
2525
use inference_gateway_sdk::{
26+
GatewayError,
2627
InferenceGatewayAPI,
2728
InferenceGatewayClient,
2829
Message,
2930
Provider,
30-
MessageRole
31+
MessageRole,
3132
};
3233
use log::info;
33-
use std::error::Error;
3434

35-
fn main() -> Result<(), Box<dyn Error>> {
35+
fn main() -> Result<(), GatewayError> {
3636
env_logger::init();
3737

3838
let client = InferenceGatewayClient::new("http://localhost:8080");
@@ -66,6 +66,7 @@ To list all available models from all configured providers, use the `list_models
6666

6767
```rust
6868
use inference_gateway_sdk::{
69+
GatewayError
6970
InferenceGatewayAPI,
7071
InferenceGatewayClient,
7172
Message,
@@ -74,7 +75,7 @@ use inference_gateway_sdk::{
7475
};
7576
use log::info;
7677

77-
fn main() -> Result<(), Box<dyn Error>> {
78+
fn main() -> Result<(), GatewayError> {
7879
// ...create a client
7980

8081
// List all providers and models

0 commit comments

Comments
 (0)