-
- Args:
- query: The natural language query string for the agent.
- view_properties: Optional list of of property names the agent has the ability to view
- across all collections.
- context: Optional previous response from the agent.
- target_vector: Optional target vector for the query if a collection uses named vector. When
- mulitple collections are provided to the query agent, a dictionary must be used mapping
- collection names to target vectors.
- """
- request_body = {
- "query": query,
- "collection_names": [
- c.name if isinstance(c, CollectionDescription) else c
- for c in self._collections
- ],
- "headers": self._connection.additional_headers,
- "collection_view_properties": view_properties,
- "limit": 20,
- "tenant": None,
- "previous_response": context.model_dump() if context else None,