Introduced a new integration test to verify the routing parameters service when provided with the current time. This ensures the service correctly handles real-time prompts and checks it against a near-current timestamp, allowing a margin of fewer than 10 seconds.
This commit introduces a new manual integration test for the `RoutingParametersService`The test checks both the retrieval of routing parameters and the state of the conversation cache.
Refactored the generation of system prompts into dedicated methods across `RoutingParametersService` and `GTIOrchestrationService`. This improves code readability, maintainability, and ensures consistent prompt format.
This commit introduces proper localized date and time formatting for GTI requests by adding dedicated formatters with a specific time zone. Additionally, it refines API documentation annotations, streamlines method formatting, and enhances error handling to improve code readability and maintain consistency.
Revised the system prompt to provide routing advice in German. Now the assistant gives concise advice including transport mode, changes, and arrival times. This enhances user guidance and clarity.
Replaced Gson with Jackson's ObjectMapper for JSON serialization and deserialization in GTIOrchestrationService. Added JavaTimeModule registration for proper handling of Java time classes. Updated dependencies in server.gradle.kts to include jackson-datatype-jsr310.
This change introduces a new method, gpt, which is responsible for handling the GPT processing logic. The main function has been updated to use this new method for cleaner and more modular code.
Replaced String with OffsetDateTime for time-related fields in GTIOrchestrationService and AppController. This change improves the handling of dates and times by leveraging the capabilities of the OffsetDateTime class, ensuring better accuracy and consistency.
Extend the interpretation of user-provided times to handle current time requests more accurately. The service now explicitly checks for terms like 'now' and 'today', defaulting to the current time on specified days if no precise time is provided. This ensures more intuitive handling of various time-related inputs.
Updated timezone handling to "Europe/Berlin" and refactored date-time formatting to use `DateTimeFormatter.ISO_OFFSET_DATE_TIME`. Introduced constants to manage current and test times.
Changed `SYSTEM_PROMPT` to a dynamic value that includes the current date and time in UTC format. This enhances the precision and relevance of the extracted routing information by ensuring timestamps are always up to date.
Renamed ChatService to RoutingParametersService for clarity and adjusted functions accordingly. Removed the ChatService interface and now directly handle routing parameters within the renamed service. Updated the AppController to reflect these changes, ensuring seamless integration.
This commit streamlines the chat service by integrating OpenAIService directly into GTIOrchestrationService and ChatServiceImpl, eliminating redundant methods. It standardizes requests and responses using the `chatRequest` method, improves error handling, and relocates ConversationCache for better modularity.
Implemented a new service, GTIOrchestrationService, to handle orchestration logic. Added Gson dependency for JSON processing and integrated it into the chat method to convert GTI responses to JSON. This enhances the functionality by allowing JSON responses to be handled more effectively.
Refactor ChatRequest to include the 'role' parameter in the constructor, enhancing the flexibility of message roles. Updated OpenAIService to use the new constructor and added a system prompt message to guide user interactions.
Removed the old OpenAIService and integrated a new version with additional DTOs and a RestTemplate configuration. The `ChatServiceImpl` now makes use of the OpenAI API for generating responses. Jackson Kotlin module support added for JSON deserialization.