Foundry Local SDK for Python provides a control-plane interface to Foundry Local, a unified on-device AI runtime that enables local generative AI inference. It allows developers to interact with locally run models, perform chat completions, and manage local AI resources without network latency or per-token costs. The current version is 1.0.0, and it has moved to General Availability, suggesting a stable, but potentially evolving, release cadence.
pip install foundry-local-sdkVerified import paths — ran on the pinned version, not inferred.
Initializes the Foundry Local client and performs a simple chat completion using a locally available model. Before running, ensure the Foundry Local runtime is installed and running, and a model (e.g., `phi3-mini-4k-instruct`) has been downloaded via the `foundry` CLI.
Install the Foundry Local runtime from official Microsoft sources and ensure it's running before using the Python SDK. Check its status via the `foundry` CLI.
Use the `foundry download <model_name>` CLI command or `client.download_model(<model_name>)` in the SDK to fetch the desired model before attempting inference.
Refer to the latest Foundry Local documentation for current tool-calling capabilities and limitations. For older versions, simplify tool_choice to ensure only one tool is invoked.
Ensure your Foundry Local runtime and SDK are updated to the latest available version, as many such issues are resolved in subsequent releases. Check official release notes for hardware-specific fixes.
No dependency data recorded yet.