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 tmp dir not exists #401

Merged
merged 4 commits into from
Oct 24, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions autogen/retrieve_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ def get_files_from_dir(dir_path: Union[str, List[str]], types: list = TEXT_FORMA
def get_file_from_url(url: str, save_path: str = None):
"""Download a file from a URL."""
if save_path is None:
os.makedirs("/tmp/chromadb", exist_ok=True)
save_path = os.path.join("/tmp/chromadb", os.path.basename(url))
thinkall marked this conversation as resolved.
Show resolved Hide resolved
with requests.get(url, stream=True) as r:
r.raise_for_status()
Expand Down
Loading