-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/response generation #605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kallilsouza
wants to merge
16
commits into
feature/copilot-2-activation-flag
Choose a base branch
from
feature/response-generation
base: feature/copilot-2-activation-flag
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/response generation #605
kallilsouza
wants to merge
16
commits into
feature/copilot-2-activation-flag
from
feature/response-generation
Conversation
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
…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.
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.
No description provided.