Bir sonraki projenize hızlıca başlamak için hazır promptlar. Kodu kopyalayın veya doğrudan playground'da test edin.
Review the provided code for bugs, performance issues, and suggest improvements.
curl https://huboteng.com/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer hb-your-api-key" \
-d '{
"model": "openai/gpt-4o",
"messages": [
{
"role": "user",
"content": "Please review the following code. Identify any bugs, security vulnerabilities, or performance bottlenecks. Suggest improvements and provide the refactored code.\n\n```python\ndef fibonacci(n):\n if n <= 1:\n return n\n return fibonacci(n-1) + fibonacci(n-2)\n```"
}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://huboteng.com/api/v1",
api_key="hb-your-api-key"
)
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[
{"role": "user", "content": "Please review the following code. Identify any bugs, security vulnerabilities, or performance bottlenecks. Suggest improvements and provide the refactored code.\n\n```python\ndef fibonacci(n):\n if n <= 1:\n return n\n return fibonacci(n-1) + fibonacci(n-2)\n```"}
]
)
print(response.choices[0].message.content)import OpenAI from "openai";
const openai = new OpenAI({
baseURL: "https://huboteng.com/api/v1",
apiKey: "hb-your-api-key",
});
async function main() {
const completion = await openai.chat.completions.create({
model: "openai/gpt-4o",
messages: [
{ role: "user", content: "Please review the following code. Identify any bugs, security vulnerabilities, or performance bottlenecks. Suggest improvements and provide the refactored code.\n\n```python\ndef fibonacci(n):\n if n <= 1:\n return n\n return fibonacci(n-1) + fibonacci(n-2)\n```" }
],
});
console.log(completion.choices[0].message.content);
}
main();Convert rough engineering notes into a professional technical document.
curl https://huboteng.com/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer hb-your-api-key" \
-d '{
"model": "openai/gpt-4o",
"messages": [
{
"role": "user",
"content": "Act as an expert technical writer. Convert the following rough engineering notes into a well-structured, professional documentation page aimed at developers.\n\nNotes: Added new /api/v2/stream endpoint. Uses SSE. Requires Bearer token. Rate limit 100/min. Returns { chunk: string }."
}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://huboteng.com/api/v1",
api_key="hb-your-api-key"
)
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[
{"role": "user", "content": "Act as an expert technical writer. Convert the following rough engineering notes into a well-structured, professional documentation page aimed at developers.\n\nNotes: Added new /api/v2/stream endpoint. Uses SSE. Requires Bearer token. Rate limit 100/min. Returns { chunk: string }."}
]
)
print(response.choices[0].message.content)import OpenAI from "openai";
const openai = new OpenAI({
baseURL: "https://huboteng.com/api/v1",
apiKey: "hb-your-api-key",
});
async function main() {
const completion = await openai.chat.completions.create({
model: "openai/gpt-4o",
messages: [
{ role: "user", content: "Act as an expert technical writer. Convert the following rough engineering notes into a well-structured, professional documentation page aimed at developers.\n\nNotes: Added new /api/v2/stream endpoint. Uses SSE. Requires Bearer token. Rate limit 100/min. Returns { chunk: string }." }
],
});
console.log(completion.choices[0].message.content);
}
main();Extract key entities (names, dates, organizations) from unstructured text.
curl https://huboteng.com/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer hb-your-api-key" \
-d '{
"model": "openai/gpt-4o",
"messages": [
{
"role": "user",
"content": "Extract all people, organizations, dates, and locations from the following text. Output the result as a strict JSON array of objects with keys: \"entity\", \"type\", \"context\".\n\nText: Apple Inc. announced a new campus in Austin, Texas on November 20th. CEO Tim Cook was present."
}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://huboteng.com/api/v1",
api_key="hb-your-api-key"
)
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[
{"role": "user", "content": "Extract all people, organizations, dates, and locations from the following text. Output the result as a strict JSON array of objects with keys: \"entity\", \"type\", \"context\".\n\nText: Apple Inc. announced a new campus in Austin, Texas on November 20th. CEO Tim Cook was present."}
]
)
print(response.choices[0].message.content)import OpenAI from "openai";
const openai = new OpenAI({
baseURL: "https://huboteng.com/api/v1",
apiKey: "hb-your-api-key",
});
async function main() {
const completion = await openai.chat.completions.create({
model: "openai/gpt-4o",
messages: [
{ role: "user", content: "Extract all people, organizations, dates, and locations from the following text. Output the result as a strict JSON array of objects with keys: \"entity\", \"type\", \"context\".\n\nText: Apple Inc. announced a new campus in Austin, Texas on November 20th. CEO Tim Cook was present." }
],
});
console.log(completion.choices[0].message.content);
}
main();Write a short, engaging sci-fi story based on a given premise.
curl https://huboteng.com/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer hb-your-api-key" \
-d '{
"model": "openai/gpt-4o",
"messages": [
{
"role": "user",
"content": "Write a 200-word science fiction story about a time traveler who goes back to the year 1999 to prevent the invention of the smartphone, but accidentally causes something far worse."
}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://huboteng.com/api/v1",
api_key="hb-your-api-key"
)
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[
{"role": "user", "content": "Write a 200-word science fiction story about a time traveler who goes back to the year 1999 to prevent the invention of the smartphone, but accidentally causes something far worse."}
]
)
print(response.choices[0].message.content)import OpenAI from "openai";
const openai = new OpenAI({
baseURL: "https://huboteng.com/api/v1",
apiKey: "hb-your-api-key",
});
async function main() {
const completion = await openai.chat.completions.create({
model: "openai/gpt-4o",
messages: [
{ role: "user", content: "Write a 200-word science fiction story about a time traveler who goes back to the year 1999 to prevent the invention of the smartphone, but accidentally causes something far worse." }
],
});
console.log(completion.choices[0].message.content);
}
main();Convert natural language questions into complex SQL queries.
curl https://huboteng.com/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer hb-your-api-key" \
-d '{
"model": "openai/gpt-4o",
"messages": [
{
"role": "user",
"content": "Given the following PostgreSQL schema:\n- users (id, name, created_at, plan_type)\n- payments (id, user_id, amount, status, created_at)\n\nWrite a SQL query to find the top 5 users on the \"pro\" plan who have spent the most total money in the last 30 days."
}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://huboteng.com/api/v1",
api_key="hb-your-api-key"
)
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[
{"role": "user", "content": "Given the following PostgreSQL schema:\n- users (id, name, created_at, plan_type)\n- payments (id, user_id, amount, status, created_at)\n\nWrite a SQL query to find the top 5 users on the \"pro\" plan who have spent the most total money in the last 30 days."}
]
)
print(response.choices[0].message.content)import OpenAI from "openai";
const openai = new OpenAI({
baseURL: "https://huboteng.com/api/v1",
apiKey: "hb-your-api-key",
});
async function main() {
const completion = await openai.chat.completions.create({
model: "openai/gpt-4o",
messages: [
{ role: "user", content: "Given the following PostgreSQL schema:\n- users (id, name, created_at, plan_type)\n- payments (id, user_id, amount, status, created_at)\n\nWrite a SQL query to find the top 5 users on the \"pro\" plan who have spent the most total money in the last 30 days." }
],
});
console.log(completion.choices[0].message.content);
}
main();