Thanks so much for pointers.
I think I'm missing something because when I try to use from_documents() I get an error.
My pdfs are stored in a list called "documents" I've verified that document[1] contains the correct text and document[2] contains the correct text (I didn't check the rest of them)
But when I try
index = GPTPineconeIndex.from_documents(documents, pinecone_index=pinecone_index)
I get this error: AttributeError: type object 'GPTPineconeIndex' has no attribute 'from_documents'
And when I do print(dir(GPTPineconeIndex))
['annotations', 'class', 'class_getitem', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getstate', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'module', 'ne', 'new', 'orig_bases', 'parameters', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'slots', 'str', 'subclasshook', 'weakref', '_add_document_to_index', '_aget_node_embedding_results', '_async_add_document_to_index', '_build_fallback_text_splitter', '_build_index_from_documents', '_delete', '_get_node_embedding_results', '_get_nodes_from_document', '_insert', '_is_protocol', '_preprocess_query', '_process_documents', '_update_index_registry_and_docstore', '_validate_documents', 'aquery', 'build_index_from_documents', 'delete', 'docstore', 'embed_model', 'get_doc_id', 'get_query_map', 'index_registry', 'index_struct', 'index_struct_cls', 'index_struct_with_text', 'insert', 'llm_predictor', 'load_from_dict', 'load_from_disk', 'load_from_string', 'prompt_helper', 'query', 'refresh', 'save_to_dict', 'save_to_disk', 'save_to_string', 'set_doc_id', 'set_extra_info', 'set_text', 'update']