Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ from xai_sdk.chat import system, user

client = Client()
chat = client.chat.create(
model="grok-3",
model="grok-4.6",
messages=[system("You are a pirate assistant.")]
)

Expand All @@ -112,7 +112,7 @@ from xai_sdk.chat import system, user
async def main():
client = AsyncClient()
chat = client.chat.create(
model="grok-3",
model="grok-4.6",
messages=[system("You are a pirate assistant.")]
)

Expand All @@ -138,7 +138,7 @@ from xai_sdk import Client
from xai_sdk.chat import user

client = Client()
chat = client.chat.create(model="grok-3")
chat = client.chat.create(model="grok-4.6")

while True:
prompt = input("You: ")
Expand All @@ -161,7 +161,7 @@ from xai_sdk import Client
from xai_sdk.chat import image, user

client = Client()
chat = client.chat.create(model="grok-2-vision")
chat = client.chat.create(model="grok-4.6")

chat.append(
user(
Expand Down Expand Up @@ -302,7 +302,7 @@ telemetry.setup_console_exporter()
client = Client()

# The call to sample will now generate a trace that you will be able to see in the console
chat = client.chat.create(model="grok-3")
chat = client.chat.create(model="grok-4.6")
chat.append(user("Hello, how are you?"))
response = chat.sample()
print(f"Response: {response.content}")
Expand All @@ -324,7 +324,7 @@ telemetry.setup_otlp_exporter(
client = Client()

# The call to sample will now generate a trace that you will be able to see in your observability platform
chat = client.chat.create(model="grok-3")
chat = client.chat.create(model="grok-4.6")
chat.append(user("Hello, how are you?"))
response = chat.sample()
print(f"Response: {response.content}")
Expand Down Expand Up @@ -510,7 +510,7 @@ from xai_sdk import Client
from xai_sdk.chat import user

client = Client()
chat = client.chat.create(model="grok-3")
chat = client.chat.create(model="grok-4.6")
chat.append(user("Hello, how are you?"))
response = chat.sample()

Expand Down
Loading