Getting an error while using the open ai api to summarize news atricles

33 views Asked by At
# Generate summary
summary = chat(messages)
print(summary.content)

this is code

the error: Attribute Error: module 'openai' has no attribute 'error'

this is the error any help on how to fix it the rest of the code works perfectly fine.

0

There are 0 answers