Hey, everyone. I'm using a chat engine and when I ask for the bot to summarize the document like this: chat_engine.chat("Summarize this document for me: " + document). The document variable is a string that has a pdf document. It returns as an error: openai.BadRequestError: Error code: 400 - {'error': {'message': "Invalid 'messages': empty array. Expected an array with minimum length 1, but got an empty array instead.", 'type': 'invalid_request_error', 'param': 'messages', 'code': 'empty_array'}} Can someone help me?
Correct me if I'm wrong, But does your document contains the entire pdf content in string format ? if so then if summarization is the only requirement then you can do it directly with llm.
response = llm.complete("Summarize this document for me: " + document)