Skip to content

Conversation

@stainless-app
Copy link
Contributor

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


EntelligenceAI PR Summary

Release Note

Purpose:

  • Streamline file upload procedures and enhance SDK clarity with OCR and Vision capabilities.

Changes:

  • Refactor:

    • Integrated upload functionality into the client, removing the 'files' resource.
  • New Feature:

    • Added optional OCR and Vision capabilities for file uploads.
  • Style:

    • Relabeled file upload types for improved clarity.
  • Documentation:

    • Updated documentation to reflect changes, removing 'files' resource references and updating the OpenAPI specification URL.

Impact:

  • Simplifies file uploading, enhances user experience, and broadens SDK functionality with OCR and Vision. Improved naming and documentation boost developer usability and understanding.

@stainless-app stainless-app bot merged commit dae9eb6 into generated Jan 24, 2025
@stainless-app stainless-app bot deleted the feat-api-update-via-sdk-studio branch January 24, 2025 01:21
stainless-app bot added a commit that referenced this pull request Jan 24, 2025
@stainless-app stainless-app bot mentioned this pull request Jan 24, 2025
@entelligence-ai-pr-reviews
Copy link

Walkthrough

This update refactors the TaamCloud SDK by integrating the upload method directly into the client, eliminating the files resource. It introduces optional OCR and Vision capabilities for file uploads. Types related to file uploads have been renamed for clarity. Documentation in README.md and api.md has been revised to align with these changes, and the OpenAPI specification URL has been updated.

Changes

File(s) Summary
src/taam_cloud/_client.py Integrated upload functionality into the client, removing files resource. Added file upload with optional OCR and Vision capabilities.
src/taam_cloud/resources/__init__.py, src/taam_cloud/resources/files.py Removed FilesResource references and deleted files.py as it's no longer used.
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 consistency: FileUploadParams to ClientUploadParams, FileUploadResponse to UploadResponse. Updated file names accordingly.
README.md, api.md Updated documentation to reflect new client structure and method names, removing files resource references.
.stats.yml Updated OpenAPI specification URL to a new version.
Files selected (7)
  • src/taam_cloud/_client.py
  • src/taam_cloud/resources/init.py
  • src/taam_cloud/resources/files.py
  • src/taam_cloud/types/file_upload_response.py
  • src/taam_cloud/types/file_upload_params.py
  • .stats.yml
  • src/taam_cloud/types/init.py
Files ignored (3)
  • tests/api_resources/test_files.py
  • api.md
  • 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 {}

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.

0 participants