-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Radek Ježek <pc.jezek@gmail.com>
- Loading branch information
Showing
35 changed files
with
46 additions
and
1,136 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
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 was deleted.
Oops, something went wrong.
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,18 @@ | ||
import warnings | ||
|
||
_CACHED_WARNINGS: set[str] = set() | ||
|
||
|
||
def _print_deprecation_warning(msg: str): | ||
with warnings.catch_warnings(): | ||
warnings.simplefilter("always", DeprecationWarning) | ||
warnings.warn(msg, category=DeprecationWarning, stacklevel=4) # the original import is 4 levels higher | ||
|
||
|
||
def _log_deprecation_warning(key: str, msg: str): | ||
if key in _CACHED_WARNINGS: | ||
return | ||
|
||
_print_deprecation_warning(msg) | ||
|
||
_CACHED_WARNINGS.add(key) |
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
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 |
---|---|---|
@@ -1,13 +1,3 @@ | ||
"""Modules containing functionalities related to static assets (user's files)""" | ||
|
||
from genai.file.file_service import * | ||
|
||
|
||
def __getattr__(name: str): | ||
"""Allow additional imports for backward compatibility with old import system "from genai.service_name import".""" | ||
if name in globals(): | ||
return globals()[name] | ||
|
||
from genai._utils.deprecated_schema_import import _deprecated_schema_import | ||
|
||
return _deprecated_schema_import(name, __name__) |
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 |
---|---|---|
@@ -1,13 +1,3 @@ | ||
"""Modules containing functionalities related to models.""" | ||
|
||
from genai.model.model_service import * | ||
|
||
|
||
def __getattr__(name: str): | ||
"""Allow additional imports for backward compatibility with old import system "from genai.service_name import".""" | ||
if name in globals(): | ||
return globals()[name] | ||
|
||
from genai._utils.deprecated_schema_import import _deprecated_schema_import | ||
|
||
return _deprecated_schema_import(name, __name__) |
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 |
---|---|---|
@@ -1,13 +1,3 @@ | ||
"""Modules containing functionalities related to prompts""" | ||
|
||
from genai.prompt.prompt_service import * | ||
|
||
|
||
def __getattr__(name: str): | ||
"""Allow additional imports for backward compatibility with old import system "from genai.service_name import".""" | ||
if name in globals(): | ||
return globals()[name] | ||
|
||
from genai._utils.deprecated_schema_import import _deprecated_schema_import | ||
|
||
return _deprecated_schema_import(name, __name__) |
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 |
---|---|---|
@@ -1,13 +1,3 @@ | ||
"""Modules containing functionalities related to text requests (their history)""" | ||
|
||
from genai.request.request_service import * | ||
|
||
|
||
def __getattr__(name: str): | ||
"""Allow additional imports for backward compatibility with old import system "from genai.service_name import".""" | ||
if name in globals(): | ||
return globals()[name] | ||
|
||
from genai._utils.deprecated_schema_import import _deprecated_schema_import | ||
|
||
return _deprecated_schema_import(name, __name__) |
Oops, something went wrong.