You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<class 'str'> PASS
<class 'pathlib.WindowsPath'> FAIL 'WindowsPath' object has no attribute 'sample'
Comments
In execute and execute_async there are calls to if isinstance(prompt, str). This checks if the prompt is a path that needs to be loaded (rather than an instance of a prompty class). These checks could be changed to if isinstance(prompt, (str, os.PathLike)) to support both str and pathlib.Path parameters.
The text was updated successfully, but these errors were encountered:
Passing a
pathlib.Path
toprompty.execute
raises anAttributeError
exceptionSteps to recreate:
Expected:
Observed:
Comments
In execute and execute_async there are calls to
if isinstance(prompt, str)
. This checks if the prompt is a path that needs to be loaded (rather than an instance of a prompty class). These checks could be changed toif isinstance(prompt, (str, os.PathLike))
to support bothstr
andpathlib.Path
parameters.The text was updated successfully, but these errors were encountered: