add logging
This commit is contained in:
@@ -43,9 +43,14 @@ export async function run(): Promise<void> {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (isUnexpected(response)) {
|
if (isUnexpected(response)) {
|
||||||
|
console.log('Unexpected response: ', response)
|
||||||
throw response.body.error
|
throw response.body.error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('Response: ', response.body)
|
||||||
|
console.log('Choices: ', response.body.choices)
|
||||||
|
console.log('Message: ', response.body.choices[0].message)
|
||||||
|
|
||||||
const modelResponse: string | null =
|
const modelResponse: string | null =
|
||||||
response.body.choices[0].message.content
|
response.body.choices[0].message.content
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user