Skip to content

Commit

Permalink
fix: replace Completions with Chat in Azure OpenAI key validation
Browse files Browse the repository at this point in the history
  • Loading branch information
liby committed Jan 12, 2024
1 parent c226347 commit 0e2e9b3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,13 @@ function pluginValidate(completion) {
url: baseUrl+apiUrlPath,
header: header,
body: {
prompt: "Once upon a time",
"messages":[{
"content": "You are a helpful assistant.",
"role": "system",
}, {
"content": "Test connection.",
"role": "user",
}],
max_tokens: 5
},
handler: function(resp) {
Expand Down

0 comments on commit 0e2e9b3

Please sign in to comment.