Skip to content
Snippets Groups Projects
Unverified Commit 4365d693 authored by Shahar's avatar Shahar Committed by GitHub
Browse files

Fix TypeError by replacing this.openai.createChatCompletion with the correct function call (#2117)

fixed new api syntax
parent bdf37bf1
Branches
Tags
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment