mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
Enhance KnowledgeConfig with field descriptions
- Updated `results_limit` and `score_threshold` in `KnowledgeConfig` to use Pydantic's `Field` for improved documentation and clarity. - Added descriptions to both parameters to provide better context for their usage in knowledge retrieval configuration.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class KnowledgeConfig(BaseModel):
|
||||
results_limit: int = 3
|
||||
score_threshold: float = 0.35
|
||||
results_limit: int = Field(default=3, description="The number of results to return")
|
||||
score_threshold: float = Field(
|
||||
default=0.35,
|
||||
description="The minimum score for a result to be considered relevant",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user