Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix File.find_matching_files() #207

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

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Changes from all 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
6 changes: 3 additions & 3 deletions openai/api_resources/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async def adownload(
return result.content

@classmethod
def __find_matching_files(cls, name, all_files, purpose):
def __find_matching_files(cls, name, bytes, all_files, purpose):
matching_files = []
basename = os.path.basename(name)
for f in all_files:
Expand Down Expand Up @@ -234,7 +234,7 @@ def find_matching_files(
api_version=api_version,
organization=organization,
).get("data", [])
return cls.__find_matching_files(name, all_files, purpose)
return cls.__find_matching_files(name, bytes, all_files, purpose)

@classmethod
async def afind_matching_files(
Expand All @@ -258,4 +258,4 @@ async def afind_matching_files(
organization=organization,
)
).get("data", [])
return cls.__find_matching_files(name, all_files, purpose)
return cls.__find_matching_files(name, bytes, all_files, purpose)