Skip to content

OP5dev/AI-Inference-Request

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

GitHub license GitHub release tag * GitHub repository stargazers

AI Inference Request via GitHub Action

Tip

AI inference request GitHub Models via this GitHub Action.


Usage Examples

Compare available AI models to choose the best one for your use-case.

on:
  issues:
    types: opened

jobs:
  summary:
    runs-on: ubuntu-latest

    permissions:
      issues: write
      models: read

    steps:
      - name: Summarize issue
        id: prompt
        uses: op5dev/ai-inference-request@v2
        with:
          payload: |
            model: openai/gpt-4.1-mini
            messages:
              - role: system
                content: You are a helpful assistant running within GitHub CI.
              - role: user
                content: Concisely summarize this GitHub issue titled ${{ github.event.issue.title }}: ${{ github.event.issue.body }}
            max_tokens: 100
            temperature: 0.9
            top_p: 0.9

      - name: Comment summary
        run: gh issue comment $NUMBER --body "$SUMMARY"
        env:
          GH_TOKEN: ${{ github.token }}
          NUMBER: ${{ github.event.issue.number }}
          SUMMARY: ${{ steps.prompt.outputs.response }}

Inputs

Either payload or payload-file is required with at least model and messages parameters, per documentation.

Type Name Description
Data payload Body parameters of the inference request in YAML format.
Example: model…
Data payload-file Path to a file containing the body parameters of the inference request.
Example: ./payload.{json,yml}
Config show-payload Whether to show the payload in the logs.
Default: true
Config show-response Whether to show the response content in the logs.
Default: true
Admin github-api-version GitHub API version.
Default: 2022-11-28
Admin github-token GitHub token.
Default: github.token
Admin org Organization for request attribution.
Example: github.repository_owner

Outputs

Name Description
response Response content from the inference request.
response-file File path containing the complete, raw response.
payload Body parameters of the inference request in JSON format.

Security

View security policy and reporting instructions.

Tip

Pin your GitHub Action to a commit SHA to harden your CI/CD pipeline security against supply chain attacks.


Changelog

View all notable changes to this project in Keep a Changelog format, which adheres to Semantic Versioning.

Tip

All forms of contribution are very welcome and deeply appreciated for fostering open-source projects.


License

About

AI inference request GitHub Models via this GitHub Action.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  
  •