basic structure

This commit is contained in:
chris
2025-08-26 16:00:37 +00:00
parent bb235424d9
commit 9e2a5e5e8f
5 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1 @@
# api

View File

@@ -0,0 +1,28 @@
import os
from openai import OpenAI
# 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
client = OpenAI(
base_url="https://models.github.ai/inference",
api_key=os.environ["GITHUB_TOKEN"],
)
response = client.chat.completions.create(
messages=[
{
"role": "system",
"content": "",
},
{
"role": "user",
"content": "What is the capital of France?",
}
],
model="openai/gpt-4o-mini",
temperature=1,
max_tokens=4096,
top_p=1
)
print(response.choices[0].message.content)

View File

@@ -0,0 +1 @@
// js code

View File

@@ -0,0 +1,6 @@
<html>
<head>
<title>Chat app</title>
</head>
<body></body>
</html>

View File

@@ -0,0 +1,3 @@
/* body {
} */