This folder contains samples for interacting with GitHub Models using Python.
Multiple model-specific SDKs are compatible with the endpoint served under the GitHub Models catalog, such as openai
and mistralai
packages for their respective models. This makes it easy to port your currently existing code using one of those SDKs.
You can also use the azure-ai-inference
package for a cross-model unified SDK.
- openai (works with all Azure OpenAI models)
- azure-ai-inference (works with all models)
- mistral (works with all Mistral AI models)
To run a Python sample, run the following command in your terminal:
python samples/python/azure_ai_inference/multi_turn.py
To run a Python cookbook, simply open one in your IDE and execute the code cells.