Skip to content

Switch to GitHub models API for embeddings requests #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

garman
Copy link

@garman garman commented Jul 16, 2025

The GitHub Models API now supports /embeddings. This PR switches over to using the GitHub Models API.

@Copilot Copilot AI review requested due to automatic review settings July 16, 2025 19:08
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR switches from using the Azure AI inference endpoint to the GitHub Models API for embeddings requests. The change migrates all sample code and documentation to use the new GitHub Models API endpoint, which now supports embeddings functionality.

  • Updates endpoint URLs from https://models.inference.ai.azure.com to https://models.github.ai/inference
  • Adds user agent header to OpenAI client configuration for better API tracking
  • Updates environment documentation to clarify required token permissions

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
samples/python/openai/multi_turn.py Adds GitHub Models sample user agent header to OpenAI client
samples/python/openai/embeddings_getting_started.ipynb Updates OpenAI base URL to GitHub Models API endpoint
samples/python/openai/embeddings.py Changes endpoint from Azure AI to GitHub Models API
samples/python/mistralai/getting_started.ipynb Updates endpoint URL to GitHub Models API
samples/python/azure_ai_inference/getting_started.ipynb Changes endpoint to GitHub Models API
samples/python/azure_ai_inference/embeddings.py Updates endpoint URL to GitHub Models API
samples/js/openai/embeddings.js Changes endpoint from Azure AI to GitHub Models API
samples/js/azure_ai_inference/embeddings.js Updates endpoint URL to GitHub Models API
cookbooks/python/llamaindex/rag_getting_started.ipynb Updates OpenAI base URL to GitHub Models API
.env-sample Adds clarification about required token permissions

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy