Query
Query
¶
Bases: BaseModel
The basic class for the knowledge query.
Attributes:
| Name | Type | Description |
|---|---|---|
query_str |
Optional[str]
|
The query string. |
similarity_top_k |
int
|
The number of top results to return. |
embedding |
List[float]
|
The specific embedding data of the query. |
Source code in agentuniverse/agent/action/knowledge/store/query.py
Python
class Query(BaseModel):
"""The basic class for the knowledge query.
Attributes:
query_str (Optional[str]): The query string.
similarity_top_k (int): The number of top results to return.
embedding (List[float]): The specific embedding data of the query.
"""
query_str: Optional[str] = None
similarity_top_k: int = 2
embedding: List[float] = Field(default_factory=list)