[model-gateway] bug fix on module name (#16332)

This commit is contained in:
Chang Su
2026-01-02 21:56:18 -08:00
committed by GitHub
parent bdde949619
commit d8ac5eecf7
66 changed files with 189 additions and 222 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ impl std::fmt::Display for ProviderType {
/// # Example
///
/// ```
/// use sgl_model_gateway::core::{ModelCard, ModelType, ProviderType};
/// use smg::core::{ModelCard, ModelType, ProviderType};
///
/// let card = ModelCard::new("meta-llama/Llama-3.1-8B-Instruct")
/// .with_display_name("Llama 3.1 8B Instruct")
+1 -1
View File
@@ -1,7 +1,7 @@
use std::collections::HashMap;
use clap::{ArgAction, Parser, Subcommand, ValueEnum};
use sgl_model_gateway::{
use smg::{
auth::{ApiKeyEntry, ControlPlaneAuthConfig, JwtConfig, Role},
config::{
CircuitBreakerConfig, ConfigError, ConfigResult, DiscoveryConfig, HealthCheckConfig,
@@ -15,7 +15,7 @@
//! # Usage
//!
//! ```rust,ignore
//! use sgl_model_gateway::multimodal::vision::{
//! use smg::multimodal::vision::{
//! PreProcessorConfig,
//! processors::LlavaProcessor,
//! ImagePreProcessor,
@@ -116,10 +116,8 @@ pub fn otel_tracing_init(enable: bool, otlp_endpoint: Option<&str>) -> Result<()
.with_batch_config(batch_config)
.build();
let resource = Resource::default().merge(&Resource::new(vec![KeyValue::new(
"service.name",
"smg",
)]));
let resource =
Resource::default().merge(&Resource::new(vec![KeyValue::new("service.name", "smg")]));
let provider = TracerProvider::builder()
.with_span_processor(span_processor)
@@ -18,7 +18,7 @@
//! ## Usage
//!
//! ```ignore
//! use sgl_model_gateway::routers::grpc::harmony::{HarmonyDetector, HarmonyBuilder};
//! use smg::routers::grpc::harmony::{HarmonyDetector, HarmonyBuilder};
//!
//! // Detect if model supports Harmony
//! if HarmonyDetector::is_harmony_model("gpt-4o") {
+2 -2
View File
@@ -138,7 +138,7 @@ as of `sgl-model-gateway/src/tokenizer/*`.
## Usage Examples
```rust
use std::sync::Arc;
use sgl_model_gateway::tokenizer::{
use smg::tokenizer::{
create_tokenizer, SequenceDecoderOutput, StopSequenceDecoderBuilder, Tokenizer,
};
@@ -172,7 +172,7 @@ for &token in encoding.token_ids() {
```rust
// Apply a chat template when one is bundled with the tokenizer
use sgl_model_gateway::tokenizer::{chat_template::ChatTemplateParams, HuggingFaceTokenizer};
use smg::tokenizer::{chat_template::ChatTemplateParams, HuggingFaceTokenizer};
let mut hf = HuggingFaceTokenizer::from_file_with_chat_template(
"./tokenizer.json",