a wormhole in space. In their quest to ensure the survival of humanity, they confront the vastness of space-time and grapple with love and sacrifice.",        "director": "Christopher Nolan",        "rating": 8.6,    },    {        "title": "Pulp Fiction",        "description": "The lives of two mob hitmen, a boxer, a gangster's wife, and a pair of diner bandits intertwine in four tales of violence and redemption.",        "director": "Quentin Tarantino",        "rating": 8.9,    },    {        "title": "Reservoir Dogs",        "description": "When a simple jewelry heist goes horribly wrong, the surviving criminals begin to suspect that one of them is a police informant.",        "director": "Quentin Tarantino",        "rating": 8.3,    },    {        "title": "The Godfather",        "description": "An aging patriarch of an organized crime dynasty transfers control of his empire to his reluctant son.",        "director": "Francis Ford Coppola",        "rating": 9.2,    },]import getpassimport osos.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")    OpenAI API Key: ¬∑¬∑¬∑¬∑¬∑¬∑¬∑¬∑from docarray import BaseDoc, DocListfrom docarray.typing import NdArrayfrom langchain.embeddings.openai import OpenAIEmbeddings# define schema for your movie documentsclass MyDoc(BaseDoc):    title: str    description: str    description_embedding: NdArray[1536]    rating: float    director: strembeddings = OpenAIEmbeddings()# get "description" embeddings, and create documentsdocs = DocList[MyDoc](    [        MyDoc(            description_embedding=embeddings.embed_query(movie["description"]), **movie        )        for movie in movies    ])from docarray.index import HnswDocumentIndex# initialize the indexdb = HnswDocumentIndex[MyDoc](work_dir="movie_search")# add datadb.index(docs)Normal Retriever‚Äãfrom langchain.retrievers import DocArrayRetriever# create a retrieverretriever = DocArrayRetriever(    index=db,    embeddings=embeddings,
DocArray is a versatile, open-source tool for managing your multi-modal data. It lets you shape your data however you want, and offers the flexibility to store and search it using various document index backends. Plus, it gets even better - you can utilize your DocArray document index to create a DocArrayRetriever, and build awesome Langchain apps!
DocArray is a versatile, open-source tool for managing your multi-modal data. It lets you shape your data however you want, and offers the flexibility to store and search it using various document index backends. Plus, it gets even better - you can utilize your DocArray document index to create a DocArrayRetriever, and build awesome Langchain apps! ->: a wormhole in space. In their quest to ensure the survival of humanity, they confront the vastness of space-time and grapple with love and sacrifice.",        "director": "Christopher Nolan",        "rating": 8.6,    },    {        "title": "Pulp Fiction",        "description": "The lives of two mob hitmen, a boxer, a gangster's wife, and a pair of diner bandits intertwine in four tales of violence and redemption.",        "director": "Quentin Tarantino",        "rating": 8.9,    },    {        "title": "Reservoir Dogs",        "description": "When a simple jewelry heist goes horribly wrong, the surviving criminals begin to suspect that one of them is a police informant.",        "director": "Quentin Tarantino",        "rating": 8.3,    },    {        "title": "The Godfather",        "description": "An aging patriarch of an organized crime dynasty transfers control of his empire to his reluctant son.",        "director": "Francis Ford Coppola",        "rating": 9.2,    },]import getpassimport osos.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")    OpenAI API Key: ¬∑¬∑¬∑¬∑¬∑¬∑¬∑¬∑from docarray import BaseDoc, DocListfrom docarray.typing import NdArrayfrom langchain.embeddings.openai import OpenAIEmbeddings# define schema for your movie documentsclass MyDoc(BaseDoc):    title: str    description: str    description_embedding: NdArray[1536]    rating: float    director: strembeddings = OpenAIEmbeddings()# get "description" embeddings, and create documentsdocs = DocList[MyDoc](    [        MyDoc(            description_embedding=embeddings.embed_query(movie["description"]), **movie        )        for movie in movies    ])from docarray.index import HnswDocumentIndex# initialize the indexdb = HnswDocumentIndex[MyDoc](work_dir="movie_search")# add datadb.index(docs)Normal Retriever‚Äãfrom langchain.retrievers import DocArrayRetriever# create a retrieverretriever = DocArrayRetriever(    index=db,    embeddings=embeddings,