Connect routing logic with user preferences (requires authentication)#43
Merged
Merged
Conversation
- Add optional preferences field to RouteSearchRequest schema - Update search endpoint to accept optional user authentication - Retrieve stored user preferences for authenticated users - Pass combined preferences (request + stored) to AI service - Update AI service to accept and send user_preferences in payload - Add comprehensive tests for preference integration - All tests pass (91 tests) - Code passes linting and formatting checks Co-authored-by: zlendo1 <115471708+zlendo1@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Connect routing logic with user preferences
Connect routing logic with user preferences
Oct 30, 2025
Contributor
|
@copilot Make sure that |
- Changed endpoint to require authentication using get_current_user - Updated all tests to provide authentication headers - Removed unused imports - All 91 tests pass - Code passes linting and formatting checks Co-authored-by: zlendo1 <115471708+zlendo1@users.noreply.github.com>
Contributor
Author
Updated the All tests have been updated to provide authentication and all 91 tests pass successfully. Commit: 10936c5 |
Copilot
AI
changed the title
Connect routing logic with user preferences
Connect routing logic with user preferences (requires authentication)
Oct 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable AI-generated route insights to incorporate user preferences from both request payload and stored user settings. The
/routes/searchendpoint now requires authentication.Changes
Schema
preferences: List[str]field toRouteSearchRequestEndpoint (
/routes/search)AI Service
get_itinerary_insight(itinerary, user_preferences=None)to accept optional preferencesuser_preferencesin payload to/api/v1/insight/itinerarywhen providedExample Usage
AI agents receive:
{ "duration": 2700, "legs": [...], "user_preferences": ["prefer trams", "avoid buses", "eco-friendly"] }Note: Unauthenticated requests will receive a 401 Unauthorized response.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.