2025-04-03 21:55:32 +00:00
name : 'AI Inference'
description : Generate an AI response based on a provided prompt
author : 'GitHub'
2025-04-04 07:27:58 +11:00
# Add your action's branding here. This will appear on the GitHub Marketplace.
branding :
2025-04-08 04:30:16 +00:00
icon : 'message-square'
2025-04-04 07:27:58 +11:00
color : red
# Define your inputs here.
inputs :
2025-04-03 21:55:32 +00:00
prompt :
2025-04-07 04:53:19 +00:00
description : The prompt for the model
2025-04-17 17:41:35 +00:00
required : false
default : ''
prompt-file :
2025-07-24 19:11:15 +10:00
description : Path to a file containing the prompt (supports .txt and .prompt.yml
2025-07-21 00:11:26 +00:00
formats)
required : false
default : ''
input :
description : Template variables in YAML format for .prompt.yml files
2025-04-17 17:41:35 +00:00
required : false
2025-04-03 21:55:32 +00:00
default : ''
2025-08-05 01:32:32 +00:00
file_input :
description : Template variables in YAML format mapping variable names to file paths. The file contents will be used for templating.
required : false
default : ''
2025-04-07 00:09:42 +00:00
model :
description : The model to use
required : false
2025-04-08 04:30:16 +00:00
default : 'openai/gpt-4o'
2025-04-07 00:09:42 +00:00
endpoint :
description : The endpoint to use
required : false
2025-04-08 04:30:16 +00:00
default : 'https://models.github.ai/inference'
2025-04-07 04:53:19 +00:00
system-prompt :
description : The system prompt for the model
required : false
default : 'You are a helpful assistant'
2025-05-24 03:50:15 +02:00
system-prompt-file :
description : Path to a file containing the system prompt
required : false
default : ''
2025-04-07 04:53:19 +00:00
max-tokens :
2026-02-13 12:38:48 +00:00
description : The maximum number of tokens to generate (deprecated)
2025-04-07 00:09:42 +00:00
required : false
default : '200'
2026-02-13 12:15:12 +00:00
max-completion-tokens :
2026-02-13 12:38:48 +00:00
description : The maximum number of tokens to generate
2026-02-13 12:15:12 +00:00
required : false
default : ''
2026-02-04 12:12:14 +00:00
temperature :
description : The sampling temperature to use (0-1)
required : false
default : ''
top-p :
description : The nucleus sampling parameter to use (0-1)
required : false
default : ''
2025-04-07 04:53:19 +00:00
token :
description : The token to use
required : false
default : ${{ github.token }}
2025-07-16 02:19:49 +00:00
enable-github-mcp :
2025-07-15 23:23:39 +00:00
description : Enable Model Context Protocol integration with GitHub tools
required : false
default : 'false'
2025-08-04 03:06:53 +00:00
github-mcp-token :
2025-08-15 08:22:55 +02:00
description : The token to use for GitHub MCP server (defaults to the main token if not specified). This must be a PAT for MCP to work.
2025-08-04 03:06:53 +00:00
required : false
default : ''
2025-11-02 23:20:24 +01:00
github-mcp-toolsets :
description : 'Comma-separated list of toolsets to enable for GitHub MCP (e.g., "repos,issues,pull_requests,actions"). Use "all" for all toolsets, "default" for default set. If not specified, uses default toolsets (context,repos,issues,pull_requests,users).'
required : false
default : ''
2026-01-18 11:24:13 +02:00
custom-headers :
description: 'Custom HTTP headers to include in API requests. Supports both YAML format (header1 : value1) and JSON format ({"header1": "value1"}). Useful for API Management platforms, rate limiting, and request tracking.'
required : false
default : ''
2025-04-04 07:27:58 +11:00
# Define your outputs here.
outputs :
2025-04-03 21:55:32 +00:00
response :
description : The response from the model
2025-04-17 20:23:07 +00:00
response-file :
2025-04-17 17:41:35 +00:00
description : The file path where the response is saved
2025-04-04 07:27:58 +11:00
runs :
2025-08-01 12:13:15 +01:00
using : node24
2025-04-04 07:27:58 +11:00
main : dist/index.js