class_docstr: This handler handles connection and execution of the Pinecone statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","Pinecone","statements","."]
docstr: Delete records in pinecone index `table_name` based on ids or based on metadata conditions.
docstr_tok: ["Delete","records","in","pinecone","index","`","table_name","`","based","on","ids","or","based","on","metadata","conditions","."]
code: def delete(
      self, table_name: str, conditions: List[FilterCondition] = None
  ) -> HandlerResponse:
      """Delete records in pinecone index `table_name` based on ids or based on metadata conditions."""
      filters = self._translate_metadata_condition(conditions)
      ids = [
          condition.value
          for condition in conditions
          if condition.column == TableField.ID.value
      ] or None
      if filters is None and ids is None:
          raise Exception(
              "Delete query must have either id condition or metadata condition!"
          )
      index = self._get_index_handle(table_name)
      if index is None:
          return Response(
              resp_type=RESPONSE_TYPE.ERROR,
              error_message=f"Error getting index '{table_name}', are you sure the name is correct?",
          )
      try:
          if filters is None:
              index.delete(ids=ids)
          else:
              index.delete(filter=filters)
      except Exception as e:
          return Response(
              resp_type=RESPONSE_TYPE.ERROR,
              error_message=f"Error deleting records in '{table_name}': {e}",
          )
      return Response(resp_type=RESPONSE_TYPE.OK)
  
imports: from collections import OrderedDict
  from typing import List, Optional
  import pinecone
  import pandas
  import ast
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
  from mindsdb.integrations.libs.response import RESPONSE_TYPE
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerStatusResponse
  from mindsdb.integrations.libs.vectordatabase_handler import FilterCondition, FilterOperator, TableField, VectorStoreHandler
  from mindsdb.utilities import log
label_desc: Use image node_id 14 for calling the PineconeHandler obj's underlying member method code with example usage: obj.delete(table_name, conditions) and returns: Response, Response, Response