Tags: Infuzu/infuzu-python
Tags
refactor(api_client): remove unused pydantic validator import This change removes an unused 'validator' import from the pydantic module in the api_client.py file. By cleaning up unused imports, it improves code readability and reduces potential confusion for future developers working on the codebase.
feat: enhance chat completion with detailed response objects This commit introduces multiple classes representing different parts of the chat completion response, such as ChatCompletionsChoiceObject, ChatCompletionsChoiceMessageObject, and more. These changes improve the codebase by providing a structured and detailed representation of the API response, enhancing readability and maintainability. The return type of the `create_chat_completion` function is now `ChatCompletionsObject`, ensuring type safety and clarity. Additionally,
feat: enhance error handling and type annotations - Added detailed error and warning classes (APIError, APIWarning) to improve the handling and representation of API errors. - Updated InfuzuAPIError to extend httpx.HTTPStatusError for better integration with HTTP-related error handling. - Introduced logging for JSON decode errors to aid in debugging. - Enhanced type annotations in main.py for better code clarity and type checking. - Improved the import structure in __init__.py for better readability.
feat(error-handling): implement custom error handling for API requests Introduced a custom exception `InfuzuAPIError` to replace generic error handling in the `api_client`. This enhances clarity and provides a consistent error interface, making it easier to manage errors across the application.
fix(workflow): streamline PyPI publish step in GitHub Actions Simplified the PyPI publish command by consolidating authentication parameters directly into the hatch publish command. This change enhances readability and reduces potential errors in environment variable setup.
fix(workflows): simplify tag pattern for PyPI publish trigger Adjusted the tag pattern in GitHub workflow to trigger on any version tag starting with 'v'. This change allows for more flexible versioning and ensures the publish process initiates for all semantic version tags.
fix(workflow): correct version extraction and Git setup Improved the GitHub Actions workflow for publishing to PyPI by: - Assigning an ID to the version extraction step - Configuring Git user details separately - Ensuring the main branch is checked out before updating the version This ensures accurate version management and prevents errors during CI.
PreviousNext