{"repo":"vercel/ai-action","free":true,"listed":false,"github":"https://github.com/vercel/ai-action","clone":"git clone https://github.com/vercel/ai-action.git","description":"GitHub Action to interact with different AI model providers.","language":"JavaScript","stars":101,"topics":["ai","github-actions"],"license":"ISC","category":"workflow-automation","readme_excerpt":"AI Action GitHub Action to interact with different AI model providers. Please beware of risks of prompt injection when utilizing user input like issue titles/bodies/labels, see using user inputs below. Usage In order to use this action, you need to 1. create an API KEY for the AI Gateway 2. pick one of the supported models Basic Text Generation Text Generation with System Message You can provide a system message to set the behavior or context for the AI model: Structured JSON Generation When you provide a JSON schema, the action will generate structured data that conforms to your schema: Using user inputs tl;dr: Always sanitize user data and results from vercel/ai-action using environment variables before using it. Here is an example of how NOT TO DO IT Given the above workflow, a malicious issue could be created with content like this This would result in the folowing code to be executed The script loaded form https://malicious-website.com/steal-tokens could for example steal the GH TOKEN environment variable or run any other code that the attacker wishes. To avoid this type of prompt injection, always set environment variables for sanitation. Sanitizing NUMBER is not necessary, but it's easier to just in general utilize environment variables and do not utilize any GitHub variable interpolation in run blocks Inputs prompt Required. The input prompt to generate the text from. api-key Required. An API KEY for the AI Gateway. model Required. An identifier from the list of provi","default_branch":null,"files":null,"tree":[],"storefront":"/r/vercel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vercel/ai-action/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}