(
client: &mut crate::tls::GrpcInferenceClient,
label: &str,
route_name: &str,
)
| 5917 | } |
| 5918 | |
| 5919 | async fn print_inference_route( |
| 5920 | client: &mut crate::tls::GrpcInferenceClient, |
| 5921 | label: &str, |
| 5922 | route_name: &str, |
| 5923 | ) { |
| 5924 | match client |
| 5925 | .get_cluster_inference(GetClusterInferenceRequest { |
| 5926 | route_name: route_name.to_string(), |
| 5927 | }) |
| 5928 | .await |
| 5929 | { |
| 5930 | Ok(response) => { |
| 5931 | let configured = response.into_inner(); |
| 5932 | println!("{}", format!("{label}:").cyan().bold()); |
| 5933 | println!(); |
| 5934 | println!(" {} {}", "Provider:".dimmed(), configured.provider_name); |
| 5935 | println!(" {} {}", "Model:".dimmed(), configured.model_id); |
| 5936 | println!(" {} {}", "Version:".dimmed(), configured.version); |
| 5937 | print_timeout(configured.timeout_secs); |
| 5938 | } |
| 5939 | Err(e) if e.code() == Code::NotFound => { |
| 5940 | println!("{}", format!("{label}:").cyan().bold()); |
| 5941 | println!(); |
| 5942 | println!(" {}", "Not configured".dimmed()); |
| 5943 | } |
| 5944 | Err(e) => { |
| 5945 | println!("{}", format!("{label}:").cyan().bold()); |
| 5946 | println!(); |
| 5947 | println!(" {} {}", "Error:".red(), e.message()); |
| 5948 | } |
| 5949 | } |
| 5950 | } |
| 5951 | |
| 5952 | fn print_timeout(timeout_secs: u64) { |
| 5953 | if timeout_secs == 0 { |
no test coverage detected