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

Add documentation for AI bindings inputs #19295

Closed
wants to merge 3 commits into from

Conversation

thomasgauvin
Copy link
Contributor

@thomasgauvin thomasgauvin commented Jan 18, 2025

The AI bindings inputs (as far as I can tell) are undocumented. This PR adds some documentation for these.

Workers AI bindings inputs are currently partially documented, which may lead developers confused as they expect the docs to be exhaustive.

This adds docs based on REST API documentation and the types defined in the workers-sdk codebase. https://developers.cloudflare.com/api/resources/ai/methods/run/#(params)%200%20%3E%20(param)%20body%20%3E%20(schema)%20%3E%20(variant)%207%20%3E%20(property)%20repetition_penalty

Future improvements may involve documenting more than just AiTextGenerationInput but that requires more structural changes to docs.

@github-actions github-actions bot added the product:workers-ai Workers AI: https://developers.cloudflare.com/workers-ai/ label Jan 18, 2025
Copy link

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4f0890e
Status: ✅  Deploy successful!
Preview URL: https://10d75481.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://thomasgauvin-patch-6.cloudflare-docs-7ou.pages.dev

View logs

@craigsdennis
Copy link
Contributor

Hmmm... Probably better to guide to the model page right? I didn't know this page had code samples on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product:workers-ai Workers AI: https://developers.cloudflare.com/workers-ai/ size/s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants