Skip to content

Conversation

@stainless-app
Copy link
Contributor

@stainless-app stainless-app bot commented Jan 24, 2025

Automated Release PR

0.1.0-alpha.1 (2025-01-24)

Full Changelog: v0.0.1-alpha.1...v0.1.0-alpha.1

Features


This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions


EntelligenceAI PR Summary

Purpose: Streamline the TaamCloud API user interface, enhancing file upload with OCR and Vision options, and improve communication through documentation and type renames.

Changes:

  • Enhancement: Integrated upload functionality into the client, adding optional OCR and Vision capabilities.
  • Refactor: Renamed types for clarity, such as FileUploadParams to ClientUploadParams.
  • Documentation: Updated README and API docs to reflect new client structure and removed outdated sections.
  • Chore: Bumped version to 0.1.0-alpha.1.
  • Test: Renamed test_files.py to test_client.py to match new client methods.

Impact: Enhancements streamline file uploads, add user capabilities, clarify API usage, and ensure robust testing alignment.

@entelligence-ai-pr-reviews
Copy link

Walkthrough

This PR refactors the TaamCloud API by integrating the upload method directly into the client, eliminating the files resource. It introduces optional OCR and Vision capabilities for file uploads. Types have been renamed for clarity, and the version is updated to 0.1.0-alpha.1. Documentation and tests have been revised to align with these changes.

Changes

File(s) Summary
src/taam_cloud/_client.py Integrated upload functionality into the client, removing files resource. Added methods for file upload with OCR and Vision options.
src/taam_cloud/types/__init__.py, src/taam_cloud/types/file_upload_params.py, src/taam_cloud/types/file_upload_response.py Renamed types for clarity: FileUploadParams to ClientUploadParams, FileUploadResponse to UploadResponse. Updated file names accordingly.
README.md, api.md Updated documentation to reflect new client structure and method names. Removed Files section.
.release-please-manifest.json, pyproject.toml, src/taam_cloud/_version.py Updated version to 0.1.0-alpha.1.
tests/api_resources/test_files.py Renamed to test_client.py and updated tests for new client methods.
Files selected (9)
  • src/taam_cloud/_client.py
  • src/taam_cloud/resources/init.py
  • src/taam_cloud/resources/files.py
  • src/taam_cloud/_version.py
  • src/taam_cloud/types/file_upload_response.py
  • src/taam_cloud/types/file_upload_params.py
  • .release-please-manifest.json
  • .stats.yml
  • src/taam_cloud/types/init.py
Files ignored (5)
  • pyproject.toml
  • CHANGELOG.md
  • api.md
  • tests/api_resources/test_files.py
  • README.md
Entelligence.ai can learn from your feedback. Simply add 👍 / 👎 emojis to teach it your preferences. More shortcuts below

Emoji Descriptions:

  • ⚠️ Potential Issue - May require further investigation.
  • 🔒 Security Vulnerability - Fix to ensure system safety.
  • 💻 Code Improvement - Suggestions to enhance code quality.
  • 🔨 Refactor Suggestion - Recommendations for restructuring code.
  • ℹ️ Others - General comments and information.

Interact with the Bot:

  • Send a message or request using the format:
    @bot + *your message*
Example: @bot Can you suggest improvements for this code?
  • Help the Bot learn by providing feedback on its responses.
    @bot + *feedback*
Example: @bot Do not comment on `save_auth` function !

# It should be noted that the actual Content-Type header that will be
# sent to the server will contain a `boundary` parameter, e.g.
# multipart/form-data; boundary=---abc--
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Content-Type header is being set before file boundary parameter, which could allow header injection attacks. The header should be set by the multipart encoder instead.

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
extra_headers = extra_headers or {}

@taamsoftadmin taamsoftadmin merged commit 3520442 into main Jan 24, 2025
2 of 3 checks passed
@stainless-app
Copy link
Contributor Author

stainless-app bot commented Jan 24, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant