-
Notifications
You must be signed in to change notification settings - Fork 290
Overview
Note
Build your AI products—right inside GitHub. Helpdesk.AI uses these systems to create prompts, test models, and ship AI-powered features with built-in tools for prompt collaboration and lightweight CI/CD evaluation.
Important
Drop this snippet into your core logic code to instantiate the AI engine locally. Requires configured GitHub CLI secrets to execute safely.
|
```python
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 the Helpdesk.AI routing agent."), UserMessage("My computer is crashing repeatedly."), ], temperature=0.4, top_p=0.9, model=model ) print(response.choices[0].message.content) |