Trending
get_trending_topics(service, assistant_id=Query(None, description='Filter by Assistant ID.'), limit=Query(10, ge=1, le=50, description='Max number of topics to return'))
async
Get top trending questions (semantic clusters).
Parameters:
-
service(Annotated[TrendingService, Depends(get_trending_service)]) –The trending service instance.
-
assistant_id(Optional[UUID], default:Query(None, description='Filter by Assistant ID.')) –Optional UUID to filter by a specific assistant.
-
limit(int, default:Query(10, ge=1, le=50, description='Max number of topics to return')) –Maximum number of trending topics to return (1-50).
Returns:
-
List[TopicStatResponse]–List[TopicStatResponse]: A list of trending topics with their statistics.
Raises:
-
TechnicalError–If there's an error fetching the trending topics.
Source code in app/api/v1/endpoints/trending.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |