Set user agent
This commit is contained in:
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
@@ -33567,7 +33567,9 @@ async function run() {
|
||||
throw new Error('GITHUB_TOKEN is not set');
|
||||
}
|
||||
const endpoint = coreExports.getInput('endpoint');
|
||||
const client = createClient(endpoint, new AzureKeyCredential(token));
|
||||
const client = createClient(endpoint, new AzureKeyCredential(token), {
|
||||
userAgentOptions: { userAgentPrefix: 'github-actions-ai-inference' }
|
||||
});
|
||||
const response = await client.path('/chat/completions').post({
|
||||
body: {
|
||||
messages: [
|
||||
@@ -33577,8 +33579,6 @@ async function run() {
|
||||
},
|
||||
{ role: 'user', content: prompt }
|
||||
],
|
||||
temperature: 1.0,
|
||||
top_p: 1.0,
|
||||
max_tokens: maxTokens,
|
||||
model: modelName
|
||||
}
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -25,7 +25,9 @@ export async function run(): Promise<void> {
|
||||
|
||||
const endpoint = core.getInput('endpoint')
|
||||
|
||||
const client = ModelClient(endpoint, new AzureKeyCredential(token))
|
||||
const client = ModelClient(endpoint, new AzureKeyCredential(token), {
|
||||
userAgentOptions: { userAgentPrefix: 'github-actions-ai-inference' }
|
||||
})
|
||||
|
||||
const response = await client.path('/chat/completions').post({
|
||||
body: {
|
||||
@@ -36,8 +38,6 @@ export async function run(): Promise<void> {
|
||||
},
|
||||
{ role: 'user', content: prompt }
|
||||
],
|
||||
temperature: 1.0,
|
||||
top_p: 1.0,
|
||||
max_tokens: maxTokens,
|
||||
model: modelName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user