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

📂 fix: Assistants Client Initialization when Deleting Files #5040

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thelinuxkid
Copy link
Contributor

…rom azure

Pull Request Template

⚠️ Before Submitting a PR, Please Review:

  • Please ensure that you have thoroughly read and understood the Contributing Docs before submitting your Pull Request.

⚠️ Documentation Updates Notice:

  • Kindly note that documentation updates are managed in this repository: librechat.ai

Summary

Please provide a brief summary of your changes and the related issue. Include any motivation and context that is relevant to your changes. If there are any dependencies necessary for your changes, please list them here.

Change Type

Please delete any irrelevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Translation update

Testing

Please describe your test process and include instructions so that we can reproduce your test. If there are any important variables for your testing configuration, list them here.

Before

Files showed up again even after a successful delete message

After

Files are permanently gone

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

@danny-avila danny-avila changed the title chore: openai client is not necessarily present when deleting files f… 📂 fix: Assistants Client Initialization when Deleting Files Dec 20, 2024
@danny-avila
Copy link
Owner

Double-checking, I'm not entirely sure what the motivation is here. The client is needed to properly delete it from OpenAI's servers. Even if the reference is deleted from LC, it will still exist on the Assistant/OpenAI if initialization fails for some reason

@thelinuxkid
Copy link
Contributor Author

Double-checking, I'm not entirely sure what the motivation is here. The client is needed to properly delete it from OpenAI's servers. Even if the reference is deleted from LC, it will still exist on the Assistant/OpenAI if initialization fails for some reason

Hi Danny. If only Azure OpenAI is enabled (and not OpenAI) the documents will fail to be deleted when the OpenAI initiation fails.

The current code assumes that an OpenAI key is always present, which is not always the case.

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.

2 participants