Skip to content

Commit 897238b

Browse files
committed
[chore]: coderrabbit fixes
1 parent 4ff9678 commit 897238b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

backend/app/database/weaviate/operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ async def search_contributors_by_keywords(self, keywords: List[str], limit: int
215215

216216
# TODO: Add hybrid search for contributors. Default in built hybrid search doesn't support custom vectors.
217217

218-
async def get_contributor_profile(self, github_username: str) -> Optional[Dict[str, Any]]:
218+
async def get_contributor_profile(self, github_username: str) -> Optional[WeaviateUserProfile]:
219219
"""Get a specific contributor's profile by GitHub username."""
220220
try:
221221
async with get_weaviate_client() as client:
@@ -285,7 +285,7 @@ async def store_user_profile(profile: WeaviateUserProfile, embedding_vector: Lis
285285
operations = WeaviateUserOperations()
286286
return await operations.upsert_user_profile(profile, embedding_vector)
287287

288-
async def search_similar_contributors(query_embedding: List[float], limit: int = 10, min_distance: float = 0.5) -> List[Dict[str, Any]]:
288+
async def search_similar_contributors(query_embedding: List[float], limit: int = 10, min_distance: float = 0.7) -> List[Dict[str, Any]]:
289289
"""
290290
Convenience function to search for similar contributors using vector similarity.
291291
"""
@@ -299,7 +299,7 @@ async def search_contributors_by_keywords(keywords: List[str], limit: int = 10)
299299
operations = WeaviateUserOperations()
300300
return await operations.search_contributors_by_keywords(keywords, limit)
301301

302-
async def get_contributor_profile(github_username: str) -> Optional[Dict[str, Any]]:
302+
async def get_contributor_profile(github_username: str) -> Optional[WeaviateUserProfile]:
303303
"""Convenience function to get a contributor's profile by GitHub username."""
304304
operations = WeaviateUserOperations()
305305
return await operations.get_contributor_profile(github_username)

backend/app/services/embedding_service/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ async def summarize_user_profile(self, profile: WeaviateUserProfile) -> ProfileS
156156
logger.error(f"Error summarizing profile for {profile.github_username}: {str(e)}")
157157
raise
158158

159-
async def process_user_profile(self, profile: WeaviateUserProfile) -> WeaviateUserProfile:
159+
async def process_user_profile(self, profile: WeaviateUserProfile) -> tuple[WeaviateUserProfile, List[float]]:
160160
"""Process a user profile by generating summary and embedding, then updating the profile object."""
161161
try:
162162
logger.info(f"Processing user profile for Weaviate storage: {profile.github_username}")

0 commit comments

Comments
 (0)