-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #135 from rgbkrk/deprecate
Trim down for 2.0
Showing
2 changed files
with
2 additions
and
94 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 |
---|---|---|
|
@@ -15,8 +15,6 @@ | |
__author__ = """Kyle Kelley""" | ||
__email__ = "[email protected]" | ||
|
||
from deprecation import deprecated | ||
|
||
from . import models | ||
from ._version import __version__ | ||
from .chat import Chat | ||
|
@@ -30,51 +28,12 @@ | |
narrate, | ||
system, | ||
user, | ||
tool_result | ||
tool_result, | ||
) | ||
from .registry import FunctionRegistry | ||
from spork import Markdown | ||
|
||
|
||
# Deprecate Session in favor of Chat | ||
class Session(Chat): | ||
"""Interactive chats inside of computational notebooks, relying on OpenAI's API. | ||
Session is deprecated. Use `Chat` instead. | ||
""" | ||
|
||
@deprecated( | ||
deprecated_in="0.13.0", | ||
removed_in="1.0.0", | ||
current_version=__version__, | ||
details="Use `Chat` instead.", | ||
) | ||
def __init__(self, *args, **kwargs): | ||
"""Initialize a Session with an optional initial context of messages. | ||
Session is deprecated. Use `Chat` instead.""" | ||
super().__init__(*args, **kwargs) | ||
|
||
|
||
# Deprecate Session in favor of Chat | ||
class Conversation(Chat): | ||
"""Interactive chats inside of computational notebooks, relying on OpenAI's API. | ||
Conversation is deprecated. Use `Chat` instead. | ||
""" | ||
|
||
@deprecated( | ||
deprecated_in="1.0.0", | ||
removed_in="1.1.0", | ||
current_version=__version__, | ||
details="Use `Chat` instead.", | ||
) | ||
def __init__(self, *args, **kwargs): | ||
"""Initialize a Session with an optional initial context of messages. | ||
Session is deprecated. Use `Chat` instead.""" | ||
super().__init__(*args, **kwargs) | ||
|
||
__version__ = __version__ | ||
|
||
__all__ = [ | ||
"Markdown", | ||
|
@@ -88,7 +47,6 @@ def __init__(self, *args, **kwargs): | |
"function_result", | ||
"tool_result", | ||
"models", | ||
"Session", | ||
"Chat", | ||
"FunctionRegistry", | ||
"ChatlabMetadata", | ||
|
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