mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-07 19:12:09 +00:00
merge description with metadata
This commit is contained in:
parent
2bb6ca818a
commit
de382e7b45
1 changed files with 3 additions and 5 deletions
|
@ -125,14 +125,13 @@ ScoringFnParams = register_schema(
|
|||
|
||||
class CommonScoringFnFields(BaseModel):
|
||||
scoring_fn_type: ScoringFunctionType
|
||||
description: Optional[str] = None
|
||||
params: Optional[ScoringFnParams] = Field(
|
||||
description="The parameters for the scoring function for benchmark eval, these can be overridden for app eval",
|
||||
default=None,
|
||||
)
|
||||
metadata: Dict[str, Any] = Field(
|
||||
default_factory=dict,
|
||||
description="Any additional metadata for this definition",
|
||||
description="Any additional metadata for this definition (e.g. description)",
|
||||
)
|
||||
|
||||
|
||||
|
@ -173,7 +172,6 @@ class ScoringFunctions(Protocol):
|
|||
scoring_fn_type: ScoringFunctionType,
|
||||
params: Optional[ScoringFnParams] = None,
|
||||
scoring_fn_id: Optional[str] = None,
|
||||
description: Optional[str] = None,
|
||||
metadata: Optional[Dict[str, Any]] = None,
|
||||
) -> ScoringFn:
|
||||
"""
|
||||
|
@ -183,7 +181,7 @@ class ScoringFunctions(Protocol):
|
|||
:param scoring_fn_type: The type of scoring function to register. A function type can only be registered if it is a valid type.
|
||||
:param params: The parameters for the scoring function.
|
||||
:param scoring_fn_id: (Optional) The ID of the scoring function to register. If not provided, a random ID will be generated.
|
||||
:param description: (Optional) The description of the scoring function.
|
||||
:param metadata: (Optional) Any additional metadata to be associated with the scoring function.
|
||||
- E.g. {"description": "This scoring function is used for ..."}
|
||||
"""
|
||||
...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue