Tích hợp HUY MMO vào dự án của bạn chỉ trong 60 giây bằng cách đổi Base URL và API Key.
Cài đặt thư viện: pip install openai
from openai import OpenAI
# Initialize client pointing to Gateway
client = OpenAI(
base_url="https://giahuynexus.com/v1",
api_key="sk-gw-your-api-key" # Retrieve from Dashboard
)
response = client.chat.completions.create(
model="claude-3-7-sonnet", # Or gpt-4o, deepseek-chat, gemini-2.0-flash
messages=[
{"role": "system", "content": "You are an expert programming assistant."},
{"role": "user", "content": "Write an optimized prime checking function in Python."}
],
stream=True
)
for chunk in response:
content = chunk.choices[0].delta.content
if content:
print(content, end="", flush=True)
Cài đặt thư viện: npm install openai
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://giahuynexus.com/v1",
apiKey: "sk-gw-your-api-key",
});
async function main() {
const stream = await client.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "Analyze the pros and cons of microservices architecture." }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
}
main();
Trong cài đặt IDE hoặc extension (Settings → Models / OpenAI API):
https://giahuynexus.com/v1claude-3-7-sonnet, gpt-4o, deepseek-chat.
Sử dụng công cụ CLI claude chính hãng trực tiếp bằng cách gán 2 biến môi trường:
export ANTHROPIC_BASE_URL="https://giahuynexus.com/v1"
export ANTHROPIC_API_KEY="sk-gw-your-api-key"
# Launch Claude Code CLI
claude
Tạo embeddings cho LangChain, LlamaIndex hoặc Vector Database (Chroma, Pinecone, Qdrant):
curl https://giahuynexus.com/v1/embeddings \
-H "Authorization: Bearer sk-gw-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": "Machine learning and artificial intelligence are revolutionizing modern software engineering."
}'