Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidating Changes: Modifications, Additions, Movements, and Delet…
…ions Consolidating Changes from Original Repository ### Changes made in this repository Here is the updated list with duplicate lines removed and a `-` added to every line: - Refactor print_response() and Update main() for Enhanced Paragraph Handling and Logging - Add the new functions get_slm_ms_phi3_mini_sentiment_analysis_model() and get_chatroom_paragraphs_format() to the functions.py file - Add a new variable SLM_MS_PHI3_MINI_SENTIMENT_ANALYSIS_MODEL to hold the value of the model used for sentiment analysis by the "transformers" library from Hugging Face in the commbase-genai-slm-ollama-phi3-mini* bundles. - Update the bundle name in the file header - Add brand new configuration variable CHATROOM_PARAGRAPHS_FORMAT set to "one_participant_per_paragraph" by default - Ask the genai to generate two sentences to test the new configuration variable CHATROOM_PARAGRAPHS_FORMAT - bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/ renamed as bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-pinecone/ - Add the first function parameter 'total_paragraphs', which receives a number of paragraphs to speak out loud with the TTS engine increased when the configuration variable CHATROOM_PARAGRAPHS_FORMAT equals one_participant_per_paragraph - Fix the usage echo to five arguments by adding the option origin - Fix the word Pinecone in the main readme doc - Update file headers - Add new Language Translation Capabilities information to the README - Add new configuration variable CHATROOM_PARAGRAPHS_FORMAT to specify how the participant paragraphs are going to display in the chat pane - Add the new bundle commbase-text-translator-phi3-mini to the project structure - Organize response paragraphs in a single string - Merge branch 'main' of github.com:estebanways/commbase - Run the function print_response(response) after sending notifications to hardware to sync all the responses as possible without adding extra synchronization code - Move the function print_response(response) after sending notifications to hardware to sync all the responses as possible without adding extra synchronization code - Make script files executable using chmod - Make work phi3_mini_translate_language.py - Reorganize imports by category - Remove main() from translator file - Make work phi3_mini_translate_language.py with genai phi3-mini-nomemory and add it to phi3 genais with memory - Modify the model order with the phrase "(but do not include any explanation)" so the Phi3 mini 128k instruction model acts like the 4k model - Fix file headers - Rename python files using underscores instead of hyphens - Add new file phi3_translate_to_english.py as a tool to translate string values stored in variables to english - Add new file translate_to_english_with_phi3.py as a tool to translate string values stored in variables to english - Remove single quotes - Create the bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone readme description - Create the bundles/commbase-genai-slm-ollama-phi3-mini-nomemory readme description - Create the bundles/commbase-genai-slm-ollama-phi3-mini-memory readme description - Update example usage - Add bundle commbase-text-translator-phi3-mini to main readme - Add license file - Add new sections to readme - Fix code indentation - Fix image size - Fix image - Add new file commbase_text_translator_phi3_mini_file.py to be able to translate entire text files - Replace backticks with code snippets - Add new translator bundle commbase-text-translator-phi3-mini - Add new function response_sentiment_action(response) - Fix title - Fix phi3 model genai repository jpeg images ### Changes by file Here's a summary of the changes organized by file: #### README.md - Fixed typographical errors and updated references from "Picone" to "Pinecone". - Updated title and description to reflect new project names and functionalities, including sentiment analysis and chatroom formatting. - Added new Language Translation Capabilities information. - Revised description to match new project scope, especially for `commbase-genai-slm-ollama-phi3-mini-nomemory`. - Added new bundle `commbase-text-translator-phi3-mini` to the README. #### User's Guide.md - Added configurations for sentiment analysis and chatroom paragraph formatting. #### `assistant_discourse.sh` and `assistant_discourse_from_language_model.sh` - Updated to include new usage instructions and handle additional arguments. #### `commbase.conf` and `commbase.conf.default` - Modified to include: - `SLM_MS_PHI3_MINI_SENTIMENT_ANALYSIS_MODEL` - `CHATROOM_PARAGRAPHS_FORMAT` #### **commbase-genai-slm-ollama-phi3-mini-memory.py** - **Refactored `print_response()` Function**: - **Paragraph Handling**: Updated to manage different paragraph formats based on `get_chatroom_paragraphs_format()`. The function now splits responses into paragraphs using both double and single newlines to adapt to various chatroom styles. - **Enhanced Formatting**: Improved formatting logic to support diverse chatroom paragraph styles, ensuring that responses are organized and logged accurately. - **Documentation**: Comments and docstrings were updated to reflect the new functionality and provide clear explanations of the paragraph formatting process. - **Modified `response_sentiment_action()`**: - **Sentiment Analysis Integration**: Integrated the retrieval of the sentiment analysis model via `get_slm_ms_phi3_mini_sentiment_analysis_model()`, allowing the function to utilize the latest sentiment analysis tools. - **Updated Documentation**: Docstring revised for clarity, detailing the sentiment analysis and hardware notification actions to improve understanding and maintainability. - **Updated `text_to_speech()` Function**: - **New Parameter**: Added `returned_total_paragraphs` to accommodate changes in `main()` that involve paragraph count. This parameter supports the new functionality for handling paragraph-based text-to-speech synthesis. - **Enhanced `main()` Function**: - **Large Response Handling**: Added logic to handle large responses by checking word count. This ensures that the system can manage extensive responses efficiently. - **Hardware Notification**: Incorporated functionality to notify hardware when neutral sentiment is detected, improving interaction responsiveness. - **Paragraph Count Handling**: Included logic to manage paragraph counts during text-to-speech synthesis, ensuring consistency with the updated `print_response()` function. - **General Improvements**: - **Comments and Docstrings**: Refined across functions to enhance clarity and consistency, making the codebase easier to understand and maintain. - **Debugging and Error Handling**: Added debug comments and updated file operations to improve logging and error handling, ensuring better diagnostics and reliability. #### **commbase-genai-slm-ollama-phi3-mini-nomemory.py** - **Refactored `print_response()` Function**: - **Paragraph Handling**: Modified to handle different paragraph formats using `get_chatroom_paragraphs_format()`. The function now effectively manages paragraph splitting and formatting based on the updated chatroom styles. - **Formatting Enhancements**: Improved response formatting to support various chatroom styles and ensure accurate logging. - **Documentation Updates**: Comments and docstrings were updated to describe the new functionality and processing logic for better clarity. - **Modified `response_sentiment_action()`**: - **Sentiment Analysis Integration**: Updated to use `get_slm_ms_phi3_mini_sentiment_analysis_model()` for retrieving the sentiment analysis model, enhancing its capability to perform sentiment-related actions. - **Documentation**: Docstring revised to clarify the purpose and behavior of sentiment analysis and hardware notification actions. - **Updated `text_to_speech()` Function**: - **New Parameter**: Incorporated `returned_total_paragraphs` to align with the changes in `main()`, facilitating improved paragraph-based text-to-speech functionality. - **Enhanced `main()` Function**: - **Response Management**: Added logic for managing large responses by checking word counts, and implemented hardware notifications for neutral sentiments. - **Paragraph Handling**: Included functionality to handle paragraph counts in text-to-speech synthesis, ensuring that the updated `print_response()` functionality is supported. - **General Improvements**: - **Comments and Docstrings**: Enhanced for better clarity and consistency across functions, making the code easier to follow. - **Debugging and Error Handling**: Added debug comments and updated error handling to improve the reliability and maintainability of the codebase. ### Deleted Files bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/COPYING bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/README.md bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone.jpg bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/config.py bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/create_and_configure_a_new_pinecone_index.py bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/create_and_configure_pinecone_index.py bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/create_embeddings_and_upsert_data.py bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/examples/README.md bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/file_paths.py bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/functions.py bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/load_a_dataset_with_pandas.py bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/making_queries.py bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/resources/src/chat_log_20240609203647_4314.txt bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/resources/src/chat_log_20240609220435_18072.txt bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-picone/save_chat_files_as_json_dataset.py bundles/commbase-genai-slm-ollama-phi3-mini-memory/commbase-genai-slm-ollama-phi3-mini-memory.py bundles/commbase-genai-slm-ollama-phi3-mini-nomemory/commbase-genai-slm-ollama-phi3-mini-nomemory.py ### New Files bundles/commbase-genai-slm-ollama-phi3-mini-memory-remote-rag-pinecone/ bundles/commbase-genai-slm-ollama-phi3-mini-memory/commbase_genai_slm_ollama_phi3_mini_memory.py bundles/commbase-genai-slm-ollama-phi3-mini-memory/phi3_mini_translate_language.py bundles/commbase-genai-slm-ollama-phi3-mini-nomemory/commbase_genai_slm_ollama_phi3_mini_nomemory.py bundles/commbase-genai-slm-ollama-phi3-mini-nomemory/phi3_mini_translate_language.py bundles/commbase-text-translator-phi3-mini/ ### Conclusion Overall, the updates have consolidated and enhanced the repository’s capabilities, making it more robust and easier to maintain while expanding its functionality to handle more diverse use cases and configurations.
- Loading branch information