This folder contains samples for interacting with GitHub Models. Each subfolder contains examples for a specific language: JavaScript, Python, and cURL.
We provide samples in the following languages:
Use this Codespace to edit the samples and see what happens! Here are a few suggestions of things you can try.
Try switching to a different model by finding a line like the one below and changing the model selected. You can find other models to try at GitHub Marketplace.
"model": "gpt-4o-mini"
Try a different input to the model (prompt) by changing the text following "content":
in the lines below. Some examples provide multiple turns of conversation history, and you can modify those too.
{
"role": "user",
"content": "What is the capital of France?"
}
Some (but not all) models allow you to modify the "system prompt", which does not generate a response directly but changes the way the model responds. You can modifying the system prompt by finding a section like the lines below and changing the "content":
value.
{
"role": "system",
"content": "You are a helpful assistant."
}