Skip to content

Commit f449d05

Browse files
committed
hard-code input
Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com>
1 parent 1ee057d commit f449d05

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

action.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,24 @@ runs:
3232
shell: bash
3333
env:
3434
API_VERSION: ${{ inputs.github-api-version }}
35-
GH_HOST: ${{ github.server_url }}
3635
GH_TOKEN: ${{ inputs.github-token }}
3736
ORG: ${{ inputs.org != '' && format('orgs/{0}/', inputs.org) || '' }}
3837
run: |
39-
GH_HOST=$(echo $GH_HOST | sed 's/.*:\/\///')
38+
GH_HOST=$(echo $GITHUB_SERVER_URL | sed 's/.*:\/\///')
4039
4140
response_raw=$(curl --request POST --location https://models.github.ai/${ORG}inference/chat/completions \
4241
--header "Accept: application/vnd.github+json" \
4342
--header "Authorization: Bearer $GH_TOKEN" \
4443
--header "Content-Type: application/json" \
4544
--header "X-GitHub-Api-Version: $API_VERSION" \
4645
--data '{
47-
"messages": '"${{ inputs.messages }}"',
48-
"model": '"${{ inputs.model }}"'
49-
}')
46+
"messages": '[{"role": "user", "content": "Hello!"}]',
47+
"model": "${{ inputs.model }}"
48+
}')
5049
50+
# "messages": '"${{ inputs.messages }}"',
51+
# "model": '"${{ inputs.model }}"'
52+
echo $response_raw
5153
echo "response_raw=$response_raw" >> $GITHUB_OUTPUT
5254
echo "response=$response_raw | jq --raw-output '.choices[0].message.content'" >> $GITHUB_OUTPUT
5355

0 commit comments

Comments
 (0)