Skip to content
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

[AIG]New Workers Binding Methods changelog #19555

Merged
merged 6 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added src/assets/images/ai-gateway/add-binding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/ai-gateway/send-feedback.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: AI Gateway Introduces New Worker Binding Methods
description: New Worker binding methods, enhancing integration capabilities for developers.
products:
- ai-gateway
date: 2025-01-26T14:00:00Z
---

AI Gateway now exposes a native Workers bindings API, allowing you to connect Workers applications to AI Gateway directly. These methods simplify how Workers calls AI services behind your AI Gateway configurations, removing the need to use the REST API and manually authenticate.
daisyfaithauma marked this conversation as resolved.
Show resolved Hide resolved

To add an AI binding to your Worker, include the following in your `wrangler.toml` or `wrangler.json` file:

![Add an AI binding to your Worker.](~/assets/images/ai-gateway/add-binding.png)

With the new AI Gateway binding methods, you can now:

- Send feedback and update metadata with `patchLog`.
- Retrieve detailed log information using `getLog`.
- Execute universal requests to any AI Gateway provider with `run`.

For example, to send feedback and update metadata using `patchLog`:

![Send feedback and update metadata using patchLog:](~/assets/images/ai-gateway/send-feedback.png)

For detailed setup instructions, see our [AI Gateway Binding methods documentation](/ai-gateway/integrations/worker-binding-methods/).
Loading