From 9c8bbc3d7b341184568aea5f06fe22ee1cf441a2 Mon Sep 17 00:00:00 2001 From: Eden Reich Date: Tue, 28 Jan 2025 23:15:34 +0000 Subject: [PATCH] docs: Update main function to return GatewayError instead of Box Signed-off-by: Eden Reich --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a810852..a46189e 100644 --- a/README.md +++ b/README.md @@ -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> { +fn main() -> Result<(), GatewayError> { env_logger::init(); let client = InferenceGatewayClient::new("http://localhost:8080"); @@ -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, @@ -74,7 +75,7 @@ use inference_gateway_sdk::{ }; use log::info; -fn main() -> Result<(), Box> { +fn main() -> Result<(), GatewayError> { // ...create a client // List all providers and models