Skip to content

Commit

Permalink
docs: Update main function to return GatewayError instead of Box<dyn …
Browse files Browse the repository at this point in the history
…Error>

Signed-off-by: Eden Reich <[email protected]>
  • Loading branch information
edenreich committed Jan 28, 2025
1 parent 78a45fb commit 9c8bbc3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ Run `cargo add inference-gateway-sdk`.

```rust
use inference_gateway_sdk::{
GatewayError,
InferenceGatewayAPI,
InferenceGatewayClient,
Message,
Provider,
MessageRole
MessageRole,
};
use log::info;
use std::error::Error;

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

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

```rust
use inference_gateway_sdk::{
GatewayError
InferenceGatewayAPI,
InferenceGatewayClient,
Message,
Expand All @@ -74,7 +75,7 @@ use inference_gateway_sdk::{
};
use log::info;

fn main() -> Result<(), Box<dyn Error>> {
fn main() -> Result<(), GatewayError> {
// ...create a client

// List all providers and models
Expand Down

0 comments on commit 9c8bbc3

Please sign in to comment.