Overview of Foundry Local Python Samples
mainThe following Python samples demonstrate various capabilities of the Foundry Local SDK:
- native-chat-completions: Initialize the SDK, start the local service, and run streaming chat completions.
- embeddings: Generate single and batch text embeddings.
- audio-transcription: Transcribe audio files using the Whisper model.
- web-server: Start a local OpenAI-compatible web server and call it with the OpenAI Python SDK.
- web-server-responses: Call a running local OpenAI-compatible web server with the Responses API, including streaming and tool calling.
- tool-calling: Implement tool calling with custom function definitions (e.g.,
get_weather,calculate). - langchain-integration: Use LangChain for building translation and text generation chains.
- tutorial-chat-assistant: Build an interactive multi-turn chat assistant.
- tutorial-document-summarizer: Summarize documents with AI.
- tutorial-tool-calling: Create a tool-calling assistant.
- tutorial-voice-to-text: Transcribe and summarize audio.