Skip to content

collection.upsert() and client.get_or_create_collection() #8

Description

@wmbutler

Thanks for your work on this. I'm really enjoying Langchain, Chroma and OpenAI.

I am using this plugin as follows and it works great. I'm trying to also safeguard against creating new collections when one already exists. Also trying to do the same thing for items in the collection. Ideally, I'd like to know how to incorporate

client.get_or_create_collection
collection.upsert()

into my code below to facilitate this. I've started going down the path of building the db natively with Chroma, but thought it might be possible to do it in langchain with this plugin.

db = Chroma.from_texts(texts, embeddings, metadatas=metadatas, ids=ids, collection_name=collection_name, persist_directory="db")

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions