py-aidol 0.5.0__tar.gz → 0.5.1__tar.gz

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.
Files changed (41) hide show
  1. {py_aidol-0.5.0 → py_aidol-0.5.1}/PKG-INFO +1 -1
  2. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/api/companion.py +21 -40
  3. {py_aidol-0.5.0 → py_aidol-0.5.1}/pyproject.toml +1 -1
  4. {py_aidol-0.5.0 → py_aidol-0.5.1}/README.md +0 -0
  5. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/__init__.py +0 -0
  6. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/api/__init__.py +0 -0
  7. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/api/aidol.py +0 -0
  8. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/api/chatroom.py +0 -0
  9. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/api/common.py +0 -0
  10. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/api/lead.py +0 -0
  11. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/context/__init__.py +0 -0
  12. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/context/builder.py +0 -0
  13. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/factories.py +0 -0
  14. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/models/__init__.py +0 -0
  15. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/models/aidol.py +0 -0
  16. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/models/aidol_lead.py +0 -0
  17. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/models/chatroom.py +0 -0
  18. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/models/companion.py +0 -0
  19. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/protocols.py +0 -0
  20. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/providers/__init__.py +0 -0
  21. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/providers/llm/__init__.py +0 -0
  22. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/providers/llm/base.py +0 -0
  23. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/providers/llm/openai.py +0 -0
  24. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/py.typed +0 -0
  25. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/repositories/__init__.py +0 -0
  26. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/repositories/aidol.py +0 -0
  27. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/repositories/aidol_lead.py +0 -0
  28. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/repositories/chatroom.py +0 -0
  29. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/repositories/companion.py +0 -0
  30. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/schemas/__init__.py +0 -0
  31. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/schemas/aidol.py +0 -0
  32. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/schemas/aidol_lead.py +0 -0
  33. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/schemas/chatroom.py +0 -0
  34. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/schemas/companion.py +0 -0
  35. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/schemas/model_settings.py +0 -0
  36. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/schemas/persona.py +0 -0
  37. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/services/__init__.py +0 -0
  38. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/services/companion_service.py +0 -0
  39. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/services/image_generation_service.py +0 -0
  40. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/services/response_generation_service.py +0 -0
  41. {py_aidol-0.5.0 → py_aidol-0.5.1}/aidol/settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-aidol
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Create and chat with your own AI idol group
5
5
  License: Apache-2.0
6
6
  Keywords: kpop,idol,aidol,ai-companion,chatbot,image-generation
@@ -20,13 +20,7 @@ from aidol.protocols import (
20
20
  CompanionRepositoryProtocol,
21
21
  ImageStorageProtocol,
22
22
  )
23
- from aidol.schemas import (
24
- Companion,
25
- CompanionCreate,
26
- CompanionPublic,
27
- CompanionUpdate,
28
- Gender,
29
- )
23
+ from aidol.schemas import Companion, CompanionCreate, CompanionPublic, CompanionUpdate
30
24
  from aidol.services.companion_service import to_companion_public
31
25
  from aidol.settings import GoogleGenAISettings
32
26
 
@@ -90,45 +84,32 @@ class CompanionRouter(
90
84
  response_model=CompanionPaginatedResponse,
91
85
  status_code=status.HTTP_200_OK,
92
86
  summary="List Companions",
93
- description="List all Companions with optional filtering by gender and cast status",
87
+ description="List all Companions with pagination, sorting, and filtering",
94
88
  )
95
89
  async def list_companions(
96
- gender: Gender | None = Query(None, description="Filter by gender"),
97
- is_cast: bool | None = Query(
98
- None, alias="isCast", description="Filter by cast status"
90
+ current: int = Query(1, ge=1, description="Current page number"),
91
+ page_size: int = Query(
92
+ 10, alias="pageSize", ge=1, le=100, description="Items per page"
93
+ ),
94
+ sort_param: str | None = Query(
95
+ None,
96
+ alias="sort",
97
+ description='Sorting criteria in JSON format. Example: [["createdAt","desc"]]',
98
+ ),
99
+ filters_param: str | None = Query(
100
+ None,
101
+ alias="filters",
102
+ description="Filter conditions (JSON format)",
99
103
  ),
100
- aidol_id: str | None = Query(None, description="Filter by AIdol Group ID"),
101
104
  repository: CompanionRepositoryProtocol = Depends(self.get_repository_dep),
102
105
  ):
103
- """List Companions with optional gender and isCast filters."""
104
- filter_list: list[dict] = []
105
-
106
- # Add filters only if provided
107
- if gender is not None:
108
- filter_list.append(
109
- {"field": "gender", "operator": "eq", "value": gender.value}
110
- )
111
-
112
- # Filter by aidol_id if provided
113
- if aidol_id is not None:
114
- filter_list.append(
115
- {"field": "aidol_id", "operator": "eq", "value": aidol_id}
116
- )
117
-
118
- # isCast is derived from aidol_id presence
119
- # isCast=true → aidol_id is not null (belongs to a group)
120
- # isCast=false → aidol_id is null (not in a group)
121
- if is_cast is True:
122
- filter_list.append(
123
- {"field": "aidol_id", "operator": "ne", "value": None}
124
- )
125
- elif is_cast is False:
126
- filter_list.append(
127
- {"field": "aidol_id", "operator": "eq", "value": None}
128
- )
129
-
106
+ """List Companions with pagination, sorting, and filtering."""
107
+ sort_list, filter_list = self._parse_query_params(sort_param, filters_param)
130
108
  items, total = repository.get_all(
131
- filters=filter_list if filter_list else None,
109
+ current=current,
110
+ page_size=page_size,
111
+ sort=sort_list,
112
+ filters=filter_list,
132
113
  )
133
114
  # Convert to Public schema (exclude system_prompt)
134
115
  public_items = [to_companion_public(c) for c in items]
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "py-aidol"
3
- version = "0.5.0"
3
+ version = "0.5.1"
4
4
  description = "Create and chat with your own AI idol group"
5
5
  authors = ["AIoIA, Inc. <devops@aioia.ai>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes