def get_llm(model_name: str = "mistral:latest") -> ChatOllama: """ Create and configure a ChatOllama instance for local LLM inference. This function initializes a ChatOllama client configured to connect to a local Ollama server. The client is set up with deterministic output (temperature=0) for consistent responses across multiple calls with the same input. Parameters ---------- model_name : str, optional The name of the Ollama model to use for chat completions. Must be a valid model name that is available on the local Ollama installation. Default is "mistral:latest". Returns ------- ChatOllama A configured ChatOllama instance ready for chat completions. """ return ChatOllama( model=model_name, base_url="http://localhost:11434", temperature=0 ) print(get_llm().invoke("test").content)