scene_service.scene_graph.llm_client

Minimal async OpenAI-compatible client, configured by the VLM_* variables the VLM detector also reads.

Classes

SceneGraphLLMClient(*[, base_url, api_key, ...])

Chat-completions wrapper that never raises: failures return {}.

class scene_service.scene_graph.llm_client.SceneGraphLLMClient(*, base_url: str | None = None, api_key: str | None = None, model: str | None = None, timeout: float = 30.0, reasoning_effort: str | None = None)[source]

Bases: object

Chat-completions wrapper that never raises: failures return {}.

property available: bool
async chat_json(system_prompt: str, user_message: str, *, timeout: float | None = None, images: list[str] | None = None, operation: str) → dict[str, Any][source]

One request expecting a JSON object reply; {} on any failure.

images are base64 JPEGs sent as multimodal parts of the user turn. operation names the request in the LLM metrics record.