Skip to content

Commit bc895d6

Browse files
committed
docs: update changelog
1 parent 287d678 commit bc895d6

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

docs/content/4.changelog/hub-ai.md

+15-19
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,11 @@ This feature is available on both [free and pro plans](/pricing) and in [`@nuxth
2323

2424
We are excited to introduce [`hubAI()`](/docs/features/ai). This new method allows you to run machine learning models, such as LLMs, directly within your Nuxt application with minimal setup.
2525

26-
At NuxtHub, we care about DX and we want to make it easy for you to leverage AI in your application using Cloudflare AI without having to manage API keys, account ID or using the `wrangler` CLI.
27-
28-
::note
29-
**If you already have a NuxtHub account**, make sure to add the `Worker AI` permission on your Cloudflare API token.
30-
31-
- Open [Cloudflare User API Tokens](https://dash.cloudflare.com/profile/api-tokens)
32-
- Find the NuxtHub token(s)
33-
- Add the `Account > Worker AI > Read` permission
34-
- Save the changes
35-
36-
Another solution is to link again your Cloudflare account from your NuxtHub team settings by clicking on `Link a new account` > `Create a token with required permissions`.
37-
::
26+
At NuxtHub, we care about DX and we want to make it easy for you to leverage AI in your application using Cloudflare AI **without having to manage API keys, account ID or using the `wrangler` CLI**.
3827

3928
## How to use hubAI()
4029

41-
1. Update `@nuxthub/core` to the latest version
30+
1. Update `@nuxthub/core` to the latest version (`v0.7.2` or later)
4231

4332
2. Enable `hub.ai` in your `nuxt.config.ts`
4433

@@ -52,11 +41,7 @@ export default defineNuxtConfig({
5241

5342
3. Run `npx nuxthub link` to link a NuxtHub project or create a new one
5443

55-
4. That's it! You can now use [`hubAI()`](/docs/features/ai) in your Nuxt application.
56-
57-
## Example
58-
59-
This example creates a `/api/ai-test` route that generates a response from a model.
44+
4. You can now use [`hubAI()`](/docs/features/ai) in your server routes
6045

6146
```ts [server/api/ai-test.ts]
6247
export default defineEventHandler(async (event) => {
@@ -68,7 +53,18 @@ export default defineEventHandler(async (event) => {
6853

6954
Read the [full documentation](/docs/features/ai) to learn more about `hubAI()`.
7055

71-
::callout
56+
::important
57+
**If you already have a NuxtHub account**, make sure to add the `Worker AI` permission on your Cloudflare API token.
58+
59+
- Open [Cloudflare User API Tokens](https://dash.cloudflare.com/profile/api-tokens)
60+
- Find the NuxtHub token(s)
61+
- Add the `Account > Worker AI > Read` permission
62+
- Save the changes
63+
64+
Another solution is to link again your Cloudflare account from your NuxtHub team settings by clicking on `Link a new account` > `Create a token with required permissions`.
65+
::
66+
67+
::note
7268
This feature has been implemented in [nuxt-hub/core#173](https://github.com/nuxt-hub/core/pull/173).
7369
::
7470

0 commit comments

Comments
 (0)