actions/AI Inference

Generate an AI response based on a provided prompt

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
promptThe prompt for the modelno""
prompt-filePath to a file containing the prompt (supports .txt and .prompt.yml formats)no""
inputTemplate variables in YAML format for .prompt.yml filesno""
file_inputTemplate variables in YAML format mapping variable names to file paths. The file contents will be used for templating.no""
modelThe model to usenoopenai/gpt-4o
endpointThe endpoint to usenohttps://models.github.ai/inference
system-promptThe system prompt for the modelnoYou are a helpful assistant
system-prompt-filePath to a file containing the system promptno""
max-tokensThe maximum number of tokens to generate (deprecated)no200
max-completion-tokensThe maximum number of tokens to generateno""
temperatureThe sampling temperature to use (0-1)no""
top-pThe nucleus sampling parameter to use (0-1)no""
tokenThe token to useno${{ github.token }}
enable-github-mcpEnable Model Context Protocol integration with GitHub toolsnofalse
github-mcp-tokenThe token to use for GitHub MCP server (defaults to the main token if not specified). This must be a PAT for MCP to work.no""
github-mcp-toolsetsComma-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).no""
custom-headersCustom 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.no""
providerInference provider to use. "github-models" (default) calls the GitHub Models REST API. "copilot" shells out to the GitHub Copilot CLI, which must be installed and authenticated on the runner before this action runs (see README for an example workflow).nogithub-models
copilot-cli-pathPath to the Copilot CLI binary (only used when provider is "copilot"). Defaults to "copilot" on PATH.no""
copilot-allow-toolsComma-separated list of tools to allow when provider is "copilot" (passed through as --allow-tool). Example: "shell(git:*),write".no""
namedescription
responseThe response from the model
response-fileThe file path where the response is saved