-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.35 KB
/
ci.yml
File metadata and controls
55 lines (45 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
name: CI
on:
pull_request:
paths: [action.yml, .github/workflows/ci.yml]
jobs:
CI:
runs-on: [ubuntu-24.04]
permissions:
contents: read # Required to checkout repository.
models: read # Required for AI inference.
steps:
- name: Echo context
env:
GH_JSON: ${{ toJson(github) }}
run: echo "$GH_JSON"
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
sparse-checkout: action.yml
- name: Inference request
id: prompt
uses: ./
with:
payload: |
model: openai/gpt-4.1-mini
messages:
- role: system
content: You are a helpful assistant
- role: user
content: What is the capital of France
max_tokens: 100
temperature: 0.9
top_p: 0.9
- name: Echo outputs
run: |
echo "response:"
echo "${{ steps.prompt.outputs.response }}"
echo "response-file:"
echo "${{ steps.prompt.outputs.response-file }}"
echo "response-file contents:"
cat "${{ steps.prompt.outputs.response-file }}" | jq
echo "payload:"
echo "${{ steps.prompt.outputs.payload }}"