update readme with naming changes

This commit is contained in:
2025-09-23 21:38:26 -06:00
parent 1b43505bd3
commit 67a9cdc134

View File

@@ -27,7 +27,7 @@ local client = xai.create("your-api-key-here")
Make a chat completion request:
```luau
local response = client:responses({
local response = client:completions({
model = "grok-4",
messages = {
{ role = "user", content = "Hello, Grok!" }
@@ -40,7 +40,7 @@ print(response.choices[1].message.content)
For backward compatibility, you can also use the static method:
```luau
local response = xai.responses("your-api-key", request)
local response = xai.completions("your-api-key", request)
```
## Types