Skip to content

Commit e670dd5

Browse files
committed
Set user agent
1 parent 84fee7a commit e670dd5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

dist/index.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ export async function run(): Promise<void> {
2525

2626
const endpoint = core.getInput('endpoint')
2727

28-
const client = ModelClient(endpoint, new AzureKeyCredential(token))
28+
const client = ModelClient(endpoint, new AzureKeyCredential(token), {
29+
userAgentOptions: { userAgentPrefix: 'github-actions-ai-inference' }
30+
})
2931

3032
const response = await client.path('/chat/completions').post({
3133
body: {
@@ -36,8 +38,6 @@ export async function run(): Promise<void> {
3638
},
3739
{ role: 'user', content: prompt }
3840
],
39-
temperature: 1.0,
40-
top_p: 1.0,
4141
max_tokens: maxTokens,
4242
model: modelName
4343
}

0 commit comments

Comments
 (0)