原文
Send your first API call
Keep the OpenAI-compatible request shape and point it at GoModel.
API Call
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-chat-latest",
"messages": [{
"role": "user",
"content": "Hello!"
}]
}'Already using an OpenAI SDK? Change base_url and keep the rest of your code.
Python OpenAI SDK
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8080/v1",
api_key="your-gomodel-key",
)