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: Make a chat completion request:
```luau ```luau
local response = client:responses({ local response = client:completions({
model = "grok-4", model = "grok-4",
messages = { messages = {
{ role = "user", content = "Hello, Grok!" } { 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: For backward compatibility, you can also use the static method:
```luau ```luau
local response = xai.responses("your-api-key", request) local response = xai.completions("your-api-key", request)
``` ```
## Types ## Types