https://x.ai/news/grok-4
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)
- Total activity 4
- Last activity
- Member since
- Following 0 users
- Followed by 0 users
- Votes 0
- Subscriptions 3
-
https://x.ai/news/grok-4 created a post, CopilotX Ai
from xai_sdk import Clientfrom xai_sdk.chat import user, systemclient = Client(api_key="<YOUR_XAI_API_KEY_HERE>")chat = client.chat.create(model="grok-4-0709", temperature=0)chat.append(system("You...