Skip to content

Commit f6a6011

Browse files
fixed ruff lint
1 parent 1557461 commit f6a6011

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

slm_server/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ async def create_embeddings(
196196
async def list_models(
197197
settings: Annotated[Settings, Depends(get_settings)],
198198
) -> ModelListResponse:
199-
"""List available models (OpenAI-compatible). Returns the single loaded model from config."""
199+
"""List available models (OpenAI-compatible). Returns the single loaded model."""
200200
model_id = Path(settings.model_path).stem
201201
try:
202202
created = int(Path(settings.model_path).stat().st_mtime)

slm_server/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Settings(BaseSettings):
5959
model_path: str = Field(MODEL_PATH_DEFAULT, description="Model path for llama_cpp.")
6060
model_owner: str = Field(
6161
MODEL_OWNER_DEFAULT,
62-
description="Owner label for /models list (e.g. Hugging Face org). Set SLM_MODEL_OWNER to override.",
62+
description="Owner label for /models list. Set SLM_MODEL_OWNER to override.",
6363
)
6464
n_ctx: int = Field(
6565
4096, description="Maximum context window (input + generated tokens)."

slm_server/trace.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@
1414

1515
logger = logging.getLogger(__name__)
1616

17+
1718
def setup_tracing(app: FastAPI, settings: TraceSettings) -> None:
1819
"""Initialize OpenTelemetry tracing with optional Grafana Tempo export."""
1920
if not settings.enabled:
2021
return
21-
22+
2223
if not settings.endpoint or not settings.username or not settings.password:
23-
logger.warning("Grafana Tempo endpoint or credentials are not configured, skipping tracing setup")
24+
logger.warning(
25+
"Grafana Tempo endpoint or credentials not configured, skipping tracing"
26+
)
2427
return
2528

2629
# Define your service name in a Resource

0 commit comments

Comments
 (0)