CopilotX Ai

from xai_sdk import Client

from xai_sdk.chat import user, system

client = Client(api_key="<YOUR_XAI_API_KEY_HERE>")

chat = client.chat.create(model="grok-4-0709", temperature=0)

chat.append(system("You are a PhD-level mathematician."))

chat.append(user("อะไรคือผลคูณของ 3 x 4?"))

chat.append(user("อะไรคือ 5 ยกกำลัง 2?"))

chat.append(user("อะไรคือรากที่สองของ 16?"))

response = chat.sample()

print(response.content)

-1

请先登录再写评论。