-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add assistants init files (#816)
- Loading branch information
1 parent
0f81bbb
commit 7fc68cb
Showing
2 changed files
with
57 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
from warnings import warn | ||
|
||
from twilio.rest.assistants import AssistantsBase | ||
from twilio.rest.assistants.v1.assistant import AssistantList | ||
from twilio.rest.assistants.v1.knowledge import KnowledgeList | ||
from twilio.rest.assistants.v1.policy import PolicyList | ||
from twilio.rest.assistants.v1.session import SessionList | ||
from twilio.rest.assistants.v1.tool import ToolList | ||
|
||
|
||
class Assistants(AssistantsBase): | ||
|
||
@property | ||
def assistants(self) -> AssistantList: | ||
warn( | ||
"assistants is deprecated. Use v1.assistants instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return self.v1.assistants | ||
|
||
@property | ||
def knowledge(self) -> KnowledgeList: | ||
warn( | ||
"knowledge is deprecated. Use v1.knowledge instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return self.v1.knowledge | ||
|
||
@property | ||
def policies(self) -> PolicyList: | ||
warn( | ||
"policies is deprecated. Use v1.policies instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return self.v1.policies | ||
|
||
@property | ||
def sessions(self) -> SessionList: | ||
warn( | ||
"sessions is deprecated. Use v1.sessions instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return self.v1.sessions | ||
|
||
@property | ||
def tools(self) -> ToolList: | ||
warn( | ||
"tools is deprecated. Use v1.tools instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return self.v1.tools |
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