mirror of
https://github.com/microsoft/autogen.git
synced 2025-09-13 18:25:42 +00:00
Update GitHub Models url to the new url (#6759)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
This commit is contained in:
parent
64f27510ed
commit
02e6574566
@ -294,7 +294,7 @@ public partial class ChatCompletionClientAgentTests
|
|||||||
private ChatCompletionsClient CreateChatCompletionClient()
|
private ChatCompletionsClient CreateChatCompletionClient()
|
||||||
{
|
{
|
||||||
var apiKey = Environment.GetEnvironmentVariable("GH_API_KEY") ?? throw new Exception("Please set GH_API_KEY environment variable.");
|
var apiKey = Environment.GetEnvironmentVariable("GH_API_KEY") ?? throw new Exception("Please set GH_API_KEY environment variable.");
|
||||||
var endpoint = "https://models.inference.ai.azure.com";
|
var endpoint = "https://models.github.ai/inference";
|
||||||
return new ChatCompletionsClient(new Uri(endpoint), new Azure.AzureKeyCredential(apiKey));
|
return new ChatCompletionsClient(new Uri(endpoint), new Azure.AzureKeyCredential(apiKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ public class RolePlayOrchestratorTests
|
|||||||
public async Task LLaMA_3_1_CoderReviewerRunnerTestAsync()
|
public async Task LLaMA_3_1_CoderReviewerRunnerTestAsync()
|
||||||
{
|
{
|
||||||
var apiKey = Environment.GetEnvironmentVariable("GH_API_KEY") ?? throw new InvalidOperationException("GH_API_KEY is not set.");
|
var apiKey = Environment.GetEnvironmentVariable("GH_API_KEY") ?? throw new InvalidOperationException("GH_API_KEY is not set.");
|
||||||
var endPoint = "https://models.inference.ai.azure.com";
|
var endPoint = "https://models.github.ai/inference";
|
||||||
|
|
||||||
var chatCompletionClient = new ChatCompletionsClient(new Uri(endPoint), new Azure.AzureKeyCredential(apiKey));
|
var chatCompletionClient = new ChatCompletionsClient(new Uri(endPoint), new Azure.AzureKeyCredential(apiKey));
|
||||||
var agent = new ChatCompletionsClientAgent(
|
var agent = new ChatCompletionsClientAgent(
|
||||||
|
@ -248,7 +248,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"client = AzureAIChatCompletionClient(\n",
|
"client = AzureAIChatCompletionClient(\n",
|
||||||
" model=\"Phi-4\",\n",
|
" model=\"Phi-4\",\n",
|
||||||
" endpoint=\"https://models.inference.ai.azure.com\",\n",
|
" endpoint=\"https://models.github.ai/inference\",\n",
|
||||||
" # To authenticate with the model you will need to generate a personal access token (PAT) in your GitHub settings.\n",
|
" # To authenticate with the model you will need to generate a personal access token (PAT) in your GitHub settings.\n",
|
||||||
" # Create your PAT token by following instructions here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens\n",
|
" # Create your PAT token by following instructions here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens\n",
|
||||||
" credential=AzureKeyCredential(os.environ[\"GITHUB_TOKEN\"]),\n",
|
" credential=AzureKeyCredential(os.environ[\"GITHUB_TOKEN\"]),\n",
|
||||||
|
@ -220,7 +220,7 @@ class AzureAIChatCompletionClient(ChatCompletionClient):
|
|||||||
async def main():
|
async def main():
|
||||||
client = AzureAIChatCompletionClient(
|
client = AzureAIChatCompletionClient(
|
||||||
model="Phi-4",
|
model="Phi-4",
|
||||||
endpoint="https://models.inference.ai.azure.com",
|
endpoint="https://models.github.ai/inference",
|
||||||
# To authenticate with the model you will need to generate a personal access token (PAT) in your GitHub settings.
|
# To authenticate with the model you will need to generate a personal access token (PAT) in your GitHub settings.
|
||||||
# Create your PAT token by following instructions here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
|
# Create your PAT token by following instructions here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
|
||||||
credential=AzureKeyCredential(os.environ["GITHUB_TOKEN"]),
|
credential=AzureKeyCredential(os.environ["GITHUB_TOKEN"]),
|
||||||
@ -258,7 +258,7 @@ class AzureAIChatCompletionClient(ChatCompletionClient):
|
|||||||
async def main():
|
async def main():
|
||||||
client = AzureAIChatCompletionClient(
|
client = AzureAIChatCompletionClient(
|
||||||
model="Phi-4",
|
model="Phi-4",
|
||||||
endpoint="https://models.inference.ai.azure.com",
|
endpoint="https://models.github.ai/inference",
|
||||||
# To authenticate with the model you will need to generate a personal access token (PAT) in your GitHub settings.
|
# To authenticate with the model you will need to generate a personal access token (PAT) in your GitHub settings.
|
||||||
# Create your PAT token by following instructions here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
|
# Create your PAT token by following instructions here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
|
||||||
credential=AzureKeyCredential(os.environ["GITHUB_TOKEN"]),
|
credential=AzureKeyCredential(os.environ["GITHUB_TOKEN"]),
|
||||||
|
@ -9,7 +9,7 @@ from azure.ai.inference.models import (
|
|||||||
from azure.core.credentials import AzureKeyCredential
|
from azure.core.credentials import AzureKeyCredential
|
||||||
from azure.core.credentials_async import AsyncTokenCredential
|
from azure.core.credentials_async import AsyncTokenCredential
|
||||||
|
|
||||||
GITHUB_MODELS_ENDPOINT = "https://models.inference.ai.azure.com"
|
GITHUB_MODELS_ENDPOINT = "https://models.github.ai/inference"
|
||||||
|
|
||||||
|
|
||||||
class JsonSchemaFormat(TypedDict, total=False):
|
class JsonSchemaFormat(TypedDict, total=False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user