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

Refactor FileRepository to handle non-existent directories #176

Merged
merged 1 commit into from
Oct 18, 2023

Commits on Oct 18, 2023

  1. 🔧 Update FileRepository to handle missing directories

    - The FileRepository class in the BotSharp.Core.Repository namespace has been updated to handle cases where the "users" and agent directories are missing.
    - Previously, the code would throw an exception if the directories were not found, but now it checks for their existence before attempting to read files from them.
    - This change ensures that the repository can gracefully handle missing directories and continue execution without errors.
    - The update includes changes to the GetUserAgents, GetAgents, and GetConversations methods, as well as the UpdateAgent, UpdateInstruction, and UpdateFunctions methods.
    - Additionally, the code now properly checks for the existence of the "agents.json" file before attempting to read from it.
    - These changes improve the robustness and reliability of the FileRepository class.
    xbotter committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    1d468e0 View commit details
    Browse the repository at this point in the history