-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance: get more information about models (#68)
Signed-off-by: Grant Linville <[email protected]>
- Loading branch information
1 parent
64f1b28
commit d9098db
Showing
3 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from pydantic import BaseModel, conlist | ||
from typing import Any, Dict, Optional | ||
|
||
|
||
class Permission(BaseModel): | ||
created: int | ||
id: str | ||
object: str | ||
allow_create_engine: bool | ||
allow_sampling: bool | ||
allow_logprobs: bool | ||
allow_search_indices: bool | ||
allow_view: bool | ||
allow_fine_tuning: bool | ||
organization: str | ||
group: Any | ||
is_blocking: bool | ||
|
||
|
||
class Model(BaseModel): | ||
created: Optional[int] | ||
id: str | ||
object: str | ||
owned_by: str | ||
permission: Optional[conlist(Permission)] | ||
root: Optional[str] | ||
parent: Optional[str] | ||
metadata: Optional[Dict[str, str]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters