Fix TypeError by replacing this.openai.createChatCompletion with the correct function call (#2117)
fixed new api syntax
This commit is contained in:
parent
bdf37bf180
commit
4365d69359
@ -80,7 +80,7 @@ class HuggingFaceLLM {
|
||||
}
|
||||
|
||||
async getChatCompletion(messages = null, { temperature = 0.7 }) {
|
||||
const result = await this.openai.createChatCompletion({
|
||||
const result = await this.openai.chat.completions.create({
|
||||
model: this.model,
|
||||
messages,
|
||||
temperature,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user