-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Fix openai assistants with new openai version (#66)
* chore: Fis openai assistants with new openai version * chore: Fix version check * chore: Fix langchain history issue * chore: Fix langchain input issue
- Loading branch information
1 parent
d98db51
commit bf1b4e5
Showing
9 changed files
with
1,379 additions
and
1,196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
from .init import init | ||
|
||
__all__ = ["init", "new_interaction"] | ||
__version__ = "0.3.27" | ||
__version__ = "0.3.28" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import importlib.metadata | ||
|
||
from packaging import version | ||
|
||
|
||
def is_module_version_less_than(module_name: str, version_spec: str) -> bool: | ||
""" | ||
Check if the installed version of a module is less than the specified version. | ||
Parameters: | ||
module_name (str): The name of the module to check. | ||
version_spec (str): The version to compare against in the format | ||
'major.minor.patch'. | ||
Returns: | ||
bool: True if the installed version is less than the specified version, | ||
False otherwise. | ||
""" | ||
try: | ||
installed_version = importlib.metadata.version(module_name) | ||
return version.parse(installed_version) < version.parse(version_spec) | ||
except importlib.metadata.PackageNotFoundError: | ||
print(f"Module '{module_name}' is not installed.") | ||
return False |
Oops, something went wrong.