Spaces:
Running
Running
Pass project filter through generation request history
Browse files
app/generation/services/generation_service.py
CHANGED
|
@@ -314,6 +314,7 @@ class GenerationService:
|
|
| 314 |
offset: int = 0,
|
| 315 |
limit: int = 100,
|
| 316 |
product_surface: str | None = None,
|
|
|
|
| 317 |
) -> list[GenerationRequestView]:
|
| 318 |
self.ensure_ready()
|
| 319 |
records = await self.repository.list_requests(
|
|
@@ -322,6 +323,7 @@ class GenerationService:
|
|
| 322 |
offset=offset,
|
| 323 |
limit=limit,
|
| 324 |
product_surface=product_surface,
|
|
|
|
| 325 |
)
|
| 326 |
return [GenerationRequestView.from_records(request, job) for request, job in records]
|
| 327 |
|
|
|
|
| 314 |
offset: int = 0,
|
| 315 |
limit: int = 100,
|
| 316 |
product_surface: str | None = None,
|
| 317 |
+
project_id: str | None = None,
|
| 318 |
) -> list[GenerationRequestView]:
|
| 319 |
self.ensure_ready()
|
| 320 |
records = await self.repository.list_requests(
|
|
|
|
| 323 |
offset=offset,
|
| 324 |
limit=limit,
|
| 325 |
product_surface=product_surface,
|
| 326 |
+
project_id=project_id,
|
| 327 |
)
|
| 328 |
return [GenerationRequestView.from_records(request, job) for request, job in records]
|
| 329 |
|