Skip to content

Failed to create collection Error: Unknown arguments: ['payload_schema'] #577

Closed

Description

@urbanscribe

Running 1.8.2

Keep getting this error when trying to define the payload schema in a new collection

` def create_collection(self):
"""
Creates a collection with the specified vectors and payload configuration.

    Parameters:
        self: The object instance
        vectors_config: The configuration for the vectors
        payload_config: The configuration for the payload
    
    Returns:
        None
    """
    vectors_config = {
        "vectors": {
            "size": 768,  # The dimensionality of the vectors
            "distance": "Cosine"  # The distance metric for vector comparison
        }
    }
    payload_config = {
        "user_id": {"type": "integer"},
        "company_id": {"type": "integer"},
        "project_id": {"type": "integer"}
    }
    optimizers_config = {
        "max_optimization_threads": 2  # Adjust this value as needed
    }

    try:
        self.qdrant_client.create_collection(
            collection_name=self.collection_name,
            vectors_config=vectors_config,
            payload_schema=payload_config,
            optimizers_config=optimizers_config
        )
        
    except Exception as e:
        st.error(
            f"Failed to create collection '{self.collection_name}'. Error: {e}")`

Any thoughts?

Activity

  1. locked and limited conversation to collaborators on Apr 4, 2024
  2. converted this issue into a discussion #578 on Apr 4, 2024
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions