From 786ceefcbc5ac664777b6987901bd32a441ef522 Mon Sep 17 00:00:00 2001 From: Sean Goedecke Date: Mon, 7 Apr 2025 22:31:16 +0000 Subject: [PATCH] more logging --- src/main.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 45fa1b9..ba9586f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -25,6 +25,7 @@ export async function run(): Promise { const endpoint = core.getInput('endpoint') const client = ModelClient(endpoint, new AzureKeyCredential(token)) + core.debug('Endpoint: ' + endpoint) const response = await client.path('/chat/completions').post({ body: { @@ -43,13 +44,13 @@ export async function run(): Promise { }) if (isUnexpected(response)) { - console.log('Unexpected response: ', response) + core.debug('Unexpected response: ' + response) throw response.body.error } - console.log('Response: ', response.body) - console.log('Choices: ', response.body.choices) - console.log('Message: ', response.body.choices[0].message) + core.debug('Response: ' + response.body) + core.debug('Choices: ' + response.body.choices) + core.debug('Message: ' + response.body.choices[0].message) const modelResponse: string | null = response.body.choices[0].message.content