Skip to content

Commit

Permalink
fix(openai): rolled back response parsing for chat model
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaferrario committed Mar 15, 2024
1 parent ad85c14 commit 5132c35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keybert/llm/_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def extract_keywords(self, documents: List[str], candidate_keywords: List[List[s
response = chat_completions_with_backoff(self.client, **kwargs)
else:
response = self.client.chat.completions.create(**kwargs)
keywords = response.choices[0].text.strip()
keywords = response.choices[0].message.content.strip()

# Use a non-chat model
else:
Expand Down

0 comments on commit 5132c35

Please sign in to comment.