skillnet-ai 0.0.1__py3-none-any.whl → 0.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
skillnet_ai/models.py ADDED
@@ -0,0 +1,41 @@
1
+ from typing import Optional, List, Literal
2
+ from pydantic import BaseModel, Field
3
+
4
+ class SkillModel(BaseModel):
5
+ """Represents a Skill object returned from the search API."""
6
+ skill_name: str
7
+ skill_description: Optional[str] = None
8
+ author: Optional[str] = None
9
+ stars: int = 0
10
+ skill_url: Optional[str] = None
11
+ category: Optional[str] = None
12
+
13
+ class MetaModel(BaseModel):
14
+ """
15
+ Pagination and query metadata.
16
+ Contains fields for both Keyword and Vector search modes.
17
+ """
18
+ # Common fields
19
+ query: Optional[str] = None
20
+ search_mode: str = "keyword"
21
+ category: Optional[str] = None
22
+ limit: int = 20
23
+ total: int = 0
24
+
25
+ # Keyword mode specific fields (may be None in Vector mode)
26
+ page: Optional[int] = None
27
+ min_stars: Optional[int] = None
28
+ sort_by: Optional[str] = None
29
+ sort_order: Optional[str] = None
30
+
31
+ # Vector mode specific fields (may be None in Keyword mode)
32
+ threshold: Optional[float] = None
33
+
34
+ class Config:
35
+ extra = "ignore"
36
+
37
+ class SearchResponse(BaseModel):
38
+ """Wrapper for the search API response."""
39
+ data: List[SkillModel]
40
+ meta: MetaModel
41
+ success: bool