-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[AIG]Initial websocket documentation #18247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 5 total issue(s) found.
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Deploying cloudflare-docs with
|
| Latest commit: |
2368b00
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e40745c1.cloudflare-docs-7ou.pages.dev |
| Branch Preview URL: | https://aig-websockets.cloudflare-docs-7ou.pages.dev |
|
|
||
| ## Setting up | ||
|
|
||
| 1. Generate an AI Gateway token with appropriate AI Gateway Run and opt in to using an authenticated gateway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the correct way to show RUN permission?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it right off the documentation.
| ``` | ||
| wss://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id} | ||
| ``` | ||
| 3. Open a WebSocket connection authenticated with a Cloudflare token with the AI Gateway Run permission. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the correct way to show RUN permission?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it right off the documentation.
|
|
||
| The above will send a request to Workers AI Inference API, if it fails it will proceed to OpenAI. You can add as many fallbacks as you need, just by adding another JSON in the array. | ||
|
|
||
| ## Websockets API (beta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should beta be in words or be the beta label
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
Co-authored-by: Maddy <[email protected]>
* Initial websocket documentation * Update src/content/docs/ai-gateway/get-started.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/ai-gateway/providers/universal.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/ai-gateway/configuration/websockets-api.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/ai-gateway/configuration/websockets-api.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/ai-gateway/configuration/websockets-api.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * grammar * Update websockets-api.mdx * added a badge * Update src/content/docs/ai-gateway/configuration/websockets-api.mdx Co-authored-by: Maddy <[email protected]> --------- Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> Co-authored-by: Kathy <[email protected]> Co-authored-by: Maddy <[email protected]>
Summary
Initial websocket documentation
Screenshots (optional)
Documentation checklist