-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7330a71
commit 725d199
Showing
276 changed files
with
5,479 additions
and
7,379 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 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
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,37 @@ | ||
from .return_class import AbstractApiClass | ||
|
||
|
||
class NlpChatResponse(AbstractApiClass): | ||
""" | ||
A chat response from an LLM | ||
Args: | ||
client (ApiClient): An authenticated API Client instance | ||
deploymentConversationId (str): The unique identifier of the deployment conversation. | ||
messages (list): The conversation messages in the chat. | ||
""" | ||
|
||
def __init__(self, client, deploymentConversationId=None, messages=None): | ||
super().__init__(client, None) | ||
self.deployment_conversation_id = deploymentConversationId | ||
self.messages = messages | ||
self.deprecated_keys = {} | ||
|
||
def __repr__(self): | ||
repr_dict = {f'deployment_conversation_id': repr( | ||
self.deployment_conversation_id), f'messages': repr(self.messages)} | ||
class_name = "NlpChatResponse" | ||
repr_str = ',\n '.join([f'{key}={value}' for key, value in repr_dict.items( | ||
) if getattr(self, key, None) is not None and key not in self.deprecated_keys]) | ||
return f"{class_name}({repr_str})" | ||
|
||
def to_dict(self): | ||
""" | ||
Get a dict representation of the parameters in this class | ||
Returns: | ||
dict: The dict value representation of the class parameters | ||
""" | ||
resp = {'deployment_conversation_id': self.deployment_conversation_id, | ||
'messages': self.messages} | ||
return {key: value for key, value in resp.items() if value is not None and key not in self.deprecated_keys} |
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,37 @@ | ||
from .return_class import AbstractApiClass | ||
|
||
|
||
class PlaygroundText(AbstractApiClass): | ||
""" | ||
The text content inside of a playground segment. | ||
Args: | ||
client (ApiClient): An authenticated API Client instance | ||
playgroundText (str): The text of the playground segment. | ||
renderingCode (str): The rendering code of the playground segment. | ||
""" | ||
|
||
def __init__(self, client, playgroundText=None, renderingCode=None): | ||
super().__init__(client, None) | ||
self.playground_text = playgroundText | ||
self.rendering_code = renderingCode | ||
self.deprecated_keys = {} | ||
|
||
def __repr__(self): | ||
repr_dict = {f'playground_text': repr( | ||
self.playground_text), f'rendering_code': repr(self.rendering_code)} | ||
class_name = "PlaygroundText" | ||
repr_str = ',\n '.join([f'{key}={value}' for key, value in repr_dict.items( | ||
) if getattr(self, key, None) is not None and key not in self.deprecated_keys]) | ||
return f"{class_name}({repr_str})" | ||
|
||
def to_dict(self): | ||
""" | ||
Get a dict representation of the parameters in this class | ||
Returns: | ||
dict: The dict value representation of the class parameters | ||
""" | ||
resp = {'playground_text': self.playground_text, | ||
'rendering_code': self.rendering_code} | ||
return {key: value for key, value in resp.items() if value is not None and key not in self.deprecated_keys} |
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,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 787e52a6c82af449544cb6a1253baab3 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 12535596649b36dd1c7e0cddf2d1e3b2 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
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
Oops, something went wrong.