Skip to content
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

[WIP] v2 #1005

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open

[WIP] v2 #1005

wants to merge 46 commits into from

Conversation

Undertone0809
Copy link
Owner

@Undertone0809 Undertone0809 commented Oct 23, 2024

ref issue: #1055

Checkpoints

Optional:

- Add information about the built-in log system
- Include log storage path for macOS

This update provides clearer documentation on where and how logs are stored, including the addition of the macOS path.
- Remove dependency on BaseLLM class
- Update description to clarify input requirements
- Simplify initialization method
- Modify _run method to directly evaluate expressions

This refactor simplifies the Calculator class by removing unnecessary dependencies and clarifying its purpose. It now directly evaluates mathematical expressions without relying on an LLM for input processing.
Copy link

vercel bot commented Oct 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
promptulate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 11:38am

- Remove caching logic from Config class
- Simplify OpenAI API key retrieval to only use environment variables
- Update ErnieBot API wrapper to use listdict_messages directly
- Remove retry logic and caching from API key retrieval methods

This refactor improves code readability and maintainability by removing unnecessary caching and retry mechanisms, simplifying the API key retrieval process, and updating the ErnieBot API wrapper to use a more straightforward approach.
- Removed logging of model configuration to avoid redundancy.

chore: remove OpenAI key management module

- Deleted the `openai_key_pool.py` file and related imports.
- Removed associated test cases and references.

This change simplifies the codebase by eliminating unused functionality.

chore: update contact email in core utilities

- Changed contact email from `[email protected]` to `[email protected]`.

chore: reorganize imports in utility module

- Removed unused imports from `__init__.py`.
- Ensured only necessary modules are exposed in the `__all__` list.

This change improves code readability and maintainability.
Repository owner deleted a comment from coderabbitai bot Oct 23, 2024
- Change domain from 'www.promptulate.cn' to 'promptulate.cn'

This change updates the custom domain configuration to reflect the new domain name. It ensures that the project is accessible via the correct domain without the 'www' prefix.
- Add 'Version' dropdown to navigation bar
- Update home page title to 'Promptulate v2'

This commit updates the documentation to reflect the changes for the v2 release, including adding version-specific links in the navigation bar and updating the home page title.
- Delete conversation logic and prompt templates
- Remove schema definitions for conversation framework
- Deprecate Conversation class in favor of new approach

This refactor removes the existing conversation framework to streamline the codebase and prepare for integration with a new system or approach. The changes include deleting the main conversation logic, prompt templates, and schema definitions, and marking the Conversation class as deprecated.
- Change output_schema type in chat.py to Type[BaseModel]
- Update parse_content return type in _litellm.py to Tuple[str, dict]

These changes improve type safety and align with best practices for type annotations in Python.
- Move MESSAGE_TYPE dictionary to MessageSet class
- Remove unused init_chat_message_history function

This refactor improves code organization by centralizing message type mappings within the MessageSet class and removes dead code, enhancing maintainability.
- Add options object to search provider
- Implement GA tracking for search queries

This change integrates Google Analytics tracking for search events, allowing the collection of search term data for analysis. It enhances the analytics capabilities of the documentation site.
- Standardize indentation and formatting in VitePress config
- Add scrollbar hiding styles for sidebar in theme CSS

These changes enhance the codebase's maintainability and improve the user experience by hiding the sidebar scrollbar.
- Import 'Plus Jakarta Sans' font from Google Fonts
- Update --vp-font-family-base variable to use 'Plus Jakarta Sans'

This change enhances the visual consistency of the documentation site by applying a new font family across all elements.
- Change --vp-c-brand-soft color from #8b4424 to #844c33

This change adjusts the brand soft color to a slightly darker shade, improving visual consistency with the rest of the brand colors.
- Introduce a new section titled 'Best Practices' in the documentation
- Emphasize the importance of understanding 'know-why' over 'know-how'
- Highlight promptulate as a resource for learning best practices

This update enhances the documentation by providing valuable insights into best practices, which can help users better understand and apply the framework.
- Change dependency update interval from weekly to monthly
- Affects pip, github-actions, and docker ecosystems

This change reduces the frequency of dependency updates, potentially lowering the number of automated pull requests and reducing noise in the repository.
- Refactor analytics script inclusion into reusable function
- Update Open Graph and Twitter card meta tags
- Change og:image and twitter:image to use relative path '/banner.png'

This refactor improves code maintainability by consolidating the analytics scripts into a single function. The meta tag updates enhance social media sharing previews by ensuring consistent and accurate metadata.
- Implement tests for f-string and jinja2 templates
- Cover simple and complex template scenarios
- Include error handling and conditional logic tests

These tests ensure the robustness and correctness of the StringTemplate utility by validating its behavior across various template formats and scenarios.
- Add documentation-related commands to Makefile
- Add lint and format commands to Makefile
- Add new message module with various message types
- Add tests for the new message module
- Update Makefile commands to include new directories
- Delete unused chat_usage.ipynb notebook file

This commit introduces new functionalities for managing documentation, linting, and formatting. It also adds a new message module with comprehensive message types and corresponding tests. The Makefile has been updated to support these new functionalities, and an unused notebook file has been removed.
- Remove 'ms-python.black-formatter' from recommended extensions

This change updates the development environment setup by removing the Black formatter extension, which is no longer needed or has been replaced by another tool.
- Add test for UserMessage with multimodal content
- Add test for SystemMessage with list content
- Remove outdated tests for complex Jinja2 templates

These changes enhance test coverage for user and system messages, ensuring proper handling of multimodal content and list-based messages. The removal of outdated tests simplifies the test suite and reduces redundancy.
- Modify 'check.yml' to include testing across multiple OS and Python versions
- Add caching for dependencies in 'check.yml' to improve build efficiency
- Update 'python-publish.yml' to include package info extraction and version update

These changes enhance the reliability and performance of the CI/CD pipeline by ensuring comprehensive testing and efficient dependency management.
- Add 'ms-pyright.pyright' to recommended VSCode extensions
- Remove unused '__init__.py' file from inferences directory
- Add StreamMessageIterator class for handling LLM response streams
- Remove 'test_hello.py' test file

This refactor cleans up the codebase by removing unused files and adding a new class for handling LLM response streams. It also updates the recommended VSCode extensions for better development experience.
- Add Tool class with methods to convert functions to tools
- Implement JSON schema type conversion for function parameters
- Add validation for function docstrings and type hints
- Introduce ToolKit and FileToolKit classes for managing multiple tools
- Add comprehensive tests for Tool class functionalities

This feature enables the conversion of Python functions into tools compatible with OpenAI function schema, enhancing the system's capability to manage and execute various tools with proper validation and schema conversion.
- Move file-related functionalities from base.py to file.py
- Add new file operations: copy and move
- Remove commented-out code from base.py

This refactor improves code organization and adds new file operations, enhancing the toolkit's functionality.
- Add base callback handler class
- Create callback manager to manage multiple handlers
- Implement logging callback for error handling

This feature introduces a new mechanism for managing and handling callbacks in the pne library, providing a flexible and extensible way to handle different callback scenarios.
- Add run method to Tool class for executing the tool function
- Improve parameter parsing in Tool.from_function method
- Add detailed docstrings for better clarity
- Add tests to validate the new run method and parameter parsing

This refactor improves the usability and robustness of the Tool class, making it easier to execute tools and parse their parameters correctly.
- Add ToolManager class to manage various tool types
- Implement methods to register, retrieve, and run tools
- Add tests to validate ToolManager functionality

This feature enhances the tool management capabilities by allowing the registration and execution of different tool types, including functions and toolkits. It includes comprehensive tests to ensure proper handling of various tool types and error conditions.
- Change directory to './libs/pne' before running commands
- Update installation command to 'poetry install --with dev'
- Add directory change before running lint checks

These changes ensure that the PNE library is correctly installed and linted within the GitHub Actions workflow.
- Rename `from_listdict_data` method to `from_raw`
- Update type hints for `metadata` and `messages` parameters
- Add `to_raw` method to convert MessageSet instances to raw data
- Correct import paths in output_formatter module

This refactor improves code clarity and consistency by standardizing method names and type hints. It also ensures correct module references are used, preventing potential import errors.
- Add LiteLLM class with model configuration and generation methods
- Create base LLM class for future model implementations
- Update Tool class to include detailed function call schema
- Add test cases for LiteLLM class
- Introduce example usage scripts for LiteLLM

This commit introduces the LiteLLM class, which provides a structured way to interact with language models. It includes methods for generating responses and streaming output. The base LLM class is also created to serve as a foundation for future model implementations. Additionally, the Tool class is updated to include detailed function call schema, enhancing its usability. Test cases and example scripts are provided to demonstrate the usage of the new LiteLLM class.
- Rename `to_function_call` to `to_function_schema` and `to_tool_call_schema` to `to_tool_schema` for clarity
- Add new `AIChat` class with initialization and chat methods
- Implement `chat` function to use `AIChat` class
- Add new `__init__.py` file in `llm` directory

This refactor improves the clarity of tool schema methods and introduces a new chat functionality that allows for more complex interactions with AI models.
- Comment out unused code in example4
- Reorder imports in example5
- Adjust function argument descriptions in base.py
- Reorder imports in base.py

These changes enhance the readability and maintainability of the codebase without altering its functionality.
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