code: from llama_index import VectorStoreIndex, download_loader, StorageContext
  from llama_index.vector_stores import PineconeVectorStore
  
  """Simple reader that reads wikipedia."""
  from typing import Any, List
  
  from llama_index.readers.base import BaseReader
  from llama_index.schema import Document
  
  from dotenv import load_dotenv
  import os
  import openai
  import pinecone
  
  load_dotenv()
  openai.api_key = os.environ["OPENAI_API_KEY"]
  
  class JaWikipediaReader(BaseReader):
      """Wikipedia reader.
  
      Reads a page.
  
      """
  
      def __init__(self) -> None:
          """Initialize with parameters."""
          try:
              import wikipedia  # noqa: F401
          except ImportError:
              raise ImportError(
                  "`wikipedia` package not found, please run `pip install wikipedia`"
              )
  
      def load_data(self, pages: List[str], **load_kwargs: Any) -> List[Document]:
          """Load data from the input directory.
  
          Args:
              pages (List[str]): List of pages to read.
  
          """
          import wikipedia
          wikipedia.set_lang("ja")
          results = []
          for page in pages:
              page_content = wikipedia.page(page, **load_kwargs).content
              results.append(Document(text=page_content))
          return results
  
  WikipediaReader = download_loader("WikipediaReader")
  loader = JaWikipediaReader()
  documents = loader.load_data(pages=['ONE_PIECE', 'ONE_PIECEの登場人物一覧', 'ONE_PIECEの用語一覧', 'ONE_PIECEの地理'])
  
  # init pinecone
  pinecone.init(api_key=os.environ["OPENAI_API_KEY"], environment="asia-southeast1-gcp-free")
  # pinecone.create_index("manga-reader", dimension=1536, metric="cosine", pod_type="p1")
  
  # construct vector store and customize storage context
  storage_context = StorageContext.from_defaults(
      vector_store = PineconeVectorStore(pinecone.Index("manga-reader"))
  )
  index = VectorStoreIndex.from_documents(documents, storage_context=storage_context)
  
  
apis: llama_index.VectorStoreIndex.from_documents llama_index.schema.Document llama_index.download_loader
extract_api: [((366, 379), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (377, 379), False, 'from dotenv import load_dotenv\n'), ((1291, 1325), 'llama_index.download_loader', 'download_loader', (['"""WikipediaReader"""'], {}), "('WikipediaReader')\n", (1306, 1325), False, 'from llama_index import VectorStoreIndex, download_loader, StorageContext\n'), ((1476, 1572), 'pinecone.init', 'pinecone.init', ([], {'api_key': "os.environ['OPENAI_API_KEY']", 'environment': '"""asia-southeast1-gcp-free"""'}), "(api_key=os.environ['OPENAI_API_KEY'], environment=\n    'asia-southeast1-gcp-free')\n", (1489, 1572), False, 'import pinecone\n'), ((1841, 1916), 'llama_index.VectorStoreIndex.from_documents', 'VectorStoreIndex.from_documents', (['documents'], {'storage_context': 'storage_context'}), '(documents, storage_context=storage_context)\n', (1872, 1916), False, 'from llama_index import VectorStoreIndex, download_loader, StorageContext\n'), ((1049, 1073), 'wikipedia.set_lang', 'wikipedia.set_lang', (['"""ja"""'], {}), "('ja')\n", (1067, 1073), False, 'import wikipedia\n'), ((1799, 1829), 'pinecone.Index', 'pinecone.Index', (['"""manga-reader"""'], {}), "('manga-reader')\n", (1813, 1829), False, 'import pinecone\n'), ((1149, 1184), 'wikipedia.page', 'wikipedia.page', (['page'], {}), '(page, **load_kwargs)\n', (1163, 1184), False, 'import wikipedia\n'), ((1220, 1247), 'llama_index.schema.Document', 'Document', ([], {'text': 'page_content'}), '(text=page_content)\n', (1228, 1247), False, 'from llama_index.schema import Document\n')]