v0 3.0.0 → 3.0.1-canary.c2f8b19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,15 @@ if (response.error) {
|
|
|
21
21
|
throw new Error(response.error.message)
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
const preview = await v0.chats.getPreview({
|
|
25
|
+
chatId: response.data.chat.id,
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
if (preview.error) {
|
|
29
|
+
throw new Error(preview.error.message)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
console.log(preview.data?.url)
|
|
25
33
|
```
|
|
26
34
|
|
|
27
35
|
The default `v0` client uses `V0_API_KEY` when present, otherwise it falls back to Vercel OIDC auth for server-side code deployed on Vercel. Use `createV0Client` when you need custom auth or client options.
|