Home / Function/ fork() — langchain Function Reference

fork() — langchain Function Reference

Architecture documentation for the fork() function in vectorstores.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  7d6b252e_48b9_704e_b6e9_207055bfbff1["fork()"]
  d25f9e94_3ec0_b9ca_7d2f_eb7ef487ccab["Chroma"]
  7d6b252e_48b9_704e_b6e9_207055bfbff1 -->|defined in| d25f9e94_3ec0_b9ca_7d2f_eb7ef487ccab
  style 7d6b252e_48b9_704e_b6e9_207055bfbff1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/chroma/langchain_chroma/vectorstores.py lines 492–507

    def fork(self, new_name: str) -> Chroma:
        """Fork this vector store.

        Args:
            new_name: New name for the forked store.

        Returns:
            A new Chroma store forked from this vector store.

        """
        forked_collection = self._collection.fork(new_name=new_name)
        return Chroma(
            client=self._client,
            embedding_function=self._embedding_function,
            collection_name=forked_collection.name,
        )

Subdomains

Frequently Asked Questions

What does fork() do?
fork() is a function in the langchain codebase, defined in libs/partners/chroma/langchain_chroma/vectorstores.py.
Where is fork() defined?
fork() is defined in libs/partners/chroma/langchain_chroma/vectorstores.py at line 492.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free