code: def query_qdrant(
      query_texts: List[str],
      n_results: int = 10,
      client: QdrantClient = None,
      collection_name: str = "all-my-documents",
      search_string: str = "",
      embedding_model: str = "BAAI/bge-small-en-v1.5",
      qdrant_client_options: Optional[Dict] = {},
  ) -> List[List[QueryResponse]]:
      """Perform a similarity search with filters on a Qdrant collection
  
      Args:
          query_texts (List[str]): the query texts.
          n_results (Optional, int): the number of results to return. Default is 10.
          client (Optional, API): the QdrantClient instance. A default in-memory client will be instantiated if None.
          collection_name (Optional, str): the name of the collection. Default is "all-my-documents".
          search_string (Optional, str): the search string. Default is "".
          embedding_model (Optional, str): the embedding model to use. Default is "all-MiniLM-L6-v2". Will be ignored if embedding_function is not None.
          qdrant_client_options: (Optional, dict): the options for instantiating the qdrant client. Reference: https://github.com/qdrant/qdrant-client/blob/master/qdrant_client/qdrant_client.py#L36-L58.
  
      Returns:
          List[List[QueryResponse]]: the query result. The format is:
              class QueryResponse(BaseModel, extra="forbid"):  # type: ignore
                  id: Union[str, int]
                  embedding: Optional[List[float]]
                  metadata: Dict[str, Any]
                  document: str
                  score: float
      """
      if client is None:
          client = QdrantClient(**qdrant_client_options)
          client.set_model(embedding_model)
  
      results = client.query_batch(
          collection_name,
          query_texts,
          limit=n_results,
          query_filter=models.Filter(
              must=[
                  models.FieldCondition(
                      key="document",
                      match=models.MatchText(text=search_string),
                  )
              ]
          )
          if search_string
          else None,
      )
  
      data = {
          "ids": [
              [result.id for result in sublist] for sublist in results
          ],
          "documents": [
              [result.document for result in sublist]
              for sublist in results
          ],
      }
      return data
  
file_path: autogen/autogen/agentchat/contrib/qdrant_retrieve_user_proxy_agent.py
imports: from typing import Callable, Dict, List, Optional
  from autogen.agentchat.contrib.retrieve_user_proxy_agent import RetrieveUserProxyAgent
  from autogen.retrieve_utils import get_files_from_dir, split_files_to_chunks, TEXT_FORMATS
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: query_qdrant(query_texts, n_results, client, collection_name, search_string, embedding_model, qdrant_client_options) and returns: data