-
Notifications
You must be signed in to change notification settings - Fork 290
Overview
Build your AI products—right inside GitHub. Create prompts, test models, and ship AI-powered features with built-in tools for model access, prompt collaboration, and lightweight evaluation. Read the docs to learn more.
Watch this 3-minute demo reel to learn everything you can do with GitHub Models.
(Demo video placeholder)
- Create a sample prompt
- Compare multiple prompts
- Compare models
Create, evaluate, and iterate on prompts right inside your repo.
0 prompts found
Create a prompt to start building with natural language or using prompt.yml files.
Drop this snippet into your code to start using AI instantly:
import os
from azure.ai.inference import ChatCompletionsClient
from azure.ai.inference.models import SystemMessage, UserMessage
from azure.core.credentials import AzureKeyCredential
endpoint = "https://models.github.ai/inference"
model = "openai/gpt-4o"
token = os.environ["GITHUB_TOKEN"]
client = ChatCompletionsClient(
endpoint=endpoint,
credential=AzureKeyCredential(token),
)
response = client.complete(
messages=[
SystemMessage("You are a helpful assistant."),
UserMessage("What is the capital of France?"),
],
temperature=1.0,
top_p=1.0,
model=model
)
print(response.choices[0].message.content)Compare models in the playground—test parameters, token usage, and latency to find the right fit for your use case.
Test and compare models against your prompt to find the best fit, then commit it directly to your project when you're ready.
Set up a new GitHub Actions workflow using models to continually run lightweight evaluations of your AI features on every Pull Request.