Skip to content

Conversation

kallilsouza
Copy link
Contributor

No description provided.

…mponents

- Added new app `ai_features` to handle AI integrations.
- Implemented `BaseAIPlatformClient` and `BedrockClient` for AWS Bedrock.
- Created request and response handling methods for text generation.
- Added a factory for client instantiation.
- Included unit tests for the Bedrock client and factory.
- Updated `settings.py` to include the new app.
- Updated dependencies in `pyproject.toml` and `poetry.lock` for compatibility.
- Introduced the FeaturePrompt model to store prompts for AI features with fields for feature, model, settings, prompt, and version.
- Implemented unique constraints and verbose names for better clarity.
- Created initial migration for the FeaturePrompt model.
- Added a new app `copilot` with configuration for future development.
- Added `chats.apps.ai_features.copilot` to the `INSTALLED_APPS` in `settings.py` for better organization of AI features.
- Updated the `CopilotConfig` class to include the full app path for clarity and consistency.
…estions

- Removed `chats.apps.ai_features.copilot` from `INSTALLED_APPS` and added `chats.apps.ai_features.response_suggestions` for better organization.
- Deleted the `CopilotConfig` class and created a new `ResponseSuggestionsConfig` class.
- Introduced `ResponseSuggestionsService` to handle response suggestions functionality.
- Updated the `get_response_suggestion` method to accept a `room` parameter for improved context in response suggestions.
- Added type checking for the `Room` model to ensure compatibility during development.
- Included a TODO comment for future implementation of conversation injection into prompts.
…n ResponseSuggestionsService

- Introduced `CHATS_RESPONSE_SUGGESTIONS_MAX_MESSAGES` setting to control the number of messages considered for response suggestions.
- Enhanced `ResponseSuggestionsService` to log errors when the prompt does not contain the required placeholder and to log information when no messages are found in the room.
- Updated the `get_response_suggestion` method to utilize the new configuration for message retrieval.
…i/chats-engine into feature/response-generation
…Service

- Added error handling in the `get_response_suggestion` method to log errors when generating responses.
- Ensured that the conversation messages are processed correctly before generating the response.
- Improved logging for better traceability of issues related to response generation.
- Simplified the logic for slicing messages in the `get_response_suggestion` method to improve readability.
- Introduced a variable for the offset calculation to enhance clarity in message retrieval.
…i/chats-engine into feature/response-generation
- Adjusted the placement of the AWS_BEDROCK_REGION_NAME setting to ensure it is always available, regardless of S3 usage.
- Modified the `generate_text` method call to include the `prompt` parameter in the test case for better accuracy in response validation.
- Changed the Room reference in the `get_response_suggestion` method from `id` to `uuid` for consistency.
- Updated the ordering of messages from `created_at` to `created_on` to align with the model changes.
- Added unit tests for the ResponseSuggestionsService to ensure proper functionality and error handling in response generation.
- Removed unnecessary mocking of FeaturePrompt objects in the test cases for `generate_response_suggestion`.
- Updated the version of the invalid prompt in the test to ensure accurate testing of response suggestions.
- Enhanced clarity and maintainability of the test code by streamlining the setup process.
- Added a conditional check to ensure the offset calculation for message slicing only occurs when the message quantity exceeds the maximum limit.
- Enhanced the clarity of the message retrieval process in the `get_response_suggestion` method.
- Removed unused import of TYPE_CHECKING from services.py for improved clarity.
- Simplified the creation of FeaturePrompt objects in test_services.py by eliminating unnecessary variable assignment.
@kallilsouza kallilsouza marked this pull request as ready for review July 8, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant