Skip to content

Commit

Permalink
Added Conversation data API (#35)
Browse files Browse the repository at this point in the history
* Added Conversation Data API

* Fixed hyperlink issues of readme doc

* Fixed Append video URL link
  • Loading branch information
roshanijawale authored Jul 14, 2021
1 parent 5fc74b2 commit 3199192
Show file tree
Hide file tree
Showing 18 changed files with 74 additions and 23 deletions.
3 changes: 3 additions & 0 deletions example/Async_API/Audio_API/append_audio_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#To get the message from the conversation
print(conversation_object.get_messages())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())

#To get the action items from the conversation
#print(conversation_object.get_action_items())

Expand Down
3 changes: 3 additions & 0 deletions example/Async_API/Audio_API/append_audio_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#To get the message from the conversation
print(conversation_object.get_messages())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())

#To get the action items from the conversation
#print(conversation_object.get_action_items())

Expand Down
4 changes: 4 additions & 0 deletions example/Async_API/Audio_API/process_audio_file.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import symbl

file = "<file_path>"

''' like this you can pass the parameter
params = {
'name': "Meeting",
Expand Down Expand Up @@ -31,6 +32,9 @@
#To get the message from the conversation
print(conversation_object.get_messages())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())

#To get the action items from the conversation
#print(conversation_object.get_action_items())

Expand Down
3 changes: 3 additions & 0 deletions example/Async_API/Audio_API/process_audio_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#To get the message from the conversation
print(conversation_object.get_messages())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())

#To get the action items from the conversation
#print(conversation_object.get_action_items())

Expand Down
3 changes: 3 additions & 0 deletions example/Async_API/Text_API/append_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
#To get the message from the conversation
print(conversation_object.get_messages())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())

#To get the action items from the conversation
#print(conversation_object.get_action_items())

Expand Down
3 changes: 3 additions & 0 deletions example/Async_API/Text_API/process_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
# To get the message from the conversation
print(conversation_object.get_messages())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())

# To get the action items from the conversation
# print(conversation_object.get_action_items())

Expand Down
3 changes: 3 additions & 0 deletions example/Async_API/Video_API/append_video_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#To get the message from the conversation
print(conversation_object.get_messages())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())

#To get the action items from the conversation
#print(conversation_object.get_action_items())

Expand Down
3 changes: 3 additions & 0 deletions example/Async_API/Video_API/append_video_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#To get the message from the conversation
print(conversation_object.get_messages())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())

#To get the action items from the conversation
#print(conversation_object.get_action_items())

Expand Down
3 changes: 3 additions & 0 deletions example/Async_API/Video_API/process_video_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#To get the message from the conversation
print(conversation_object.get_messages())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())

#To get the action items from the conversation
#print(conversation_object.get_action_items())

Expand Down
3 changes: 3 additions & 0 deletions example/Async_API/Video_API/process_video_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#To get the message from the conversation
print(conversation_object.get_messages())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())

#To get the action items from the conversation
#print(conversation_object.get_action_items())

Expand Down
1 change: 1 addition & 0 deletions example/Conversation_Class/conversation_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
conversation_id=1234567890 # Update with the conversation Id of your conversation

print(symbl.Conversations.get_messages(conversation_id))
print(symbl.Conversations.get_conversation(conversation_id))
print(symbl.Conversations.get_action_items(conversation_id))
print(symbl.Conversations.get_follow_ups(conversation_id))
print(symbl.Conversations.get_members(conversation_id))
Expand Down
3 changes: 3 additions & 0 deletions example/Streaming_API/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#To get the message from the conversation
#print(connection_object.conversation.get_messages())

#To get the conversation data from the conversation
#print(connection_object.conversation.get_conversation())

#To get the action items from the conversation
#print(connection_object.conversation.get_action_items())

Expand Down
9 changes: 3 additions & 6 deletions example/Telephony_API/telephony_pstn.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,12 @@
# you can get the response from the conversation object, when you will stop the connection explicitly using keyboard interrupt or by using
# connection_object.stop() # you can also stop the connection after sspecifying some interval of timing

''' need to fix this block
you will need to import time module
time.sleep(10)
connection_object.stop()
'''

# To get the message from the meeting
#print(connection_object.conversation.get_messages())

#To get the conversation data from the conversation
#print(connection_object.conversation.get_conversation())

# To get the action items from the meeting
# print(connection_object.conversation.get_action_items())

Expand Down
3 changes: 3 additions & 0 deletions example/Telephony_API/telephony_sip.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
# To get the message from the conversation
#print(connection_object.conversation.get_messages())

#To get the conversation data from the conversation
#print(connection_object.conversation.get_conversation())

# To get the action items from the conversation
# print(connection_object.conversation.get_action_items())

Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ connection_object.send_audio_from_mic()

## Extended Readme

You can see all the functions provided by SDK in the **extended [readme.md](https://github.com/symblai/symbl-python/blob/roshani_readme_changes/symbl/readme.md) file**.
You can see all the functions provided by SDK in the **extended [readme.md](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/symbl/readme.md) file**.

You can go through some examples for understanding the use of all functionality [Explore more example](https://github.com/symblai/symbl-python/tree/roshani_readme_changes/example)
You can go through some examples for understanding the use of all functionality [Explore more example](https://github.com/symblai/symbl-python/tree/roshani_Conversation_data_api/example)

## Possible Errors

Expand Down
4 changes: 4 additions & 0 deletions symbl/Conversations.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ def get_questions(self):
@validate_conversation_id
def get_topics(self, parameters={}):
return self.__conversation_api.get_topics(self.__conversation_id, credentials=self.__credentials, parameters=parameters)

@validate_conversation_id
def get_conversation(self):
return self.__conversation_api.get_conversation(self.__conversation_id, credentials=self.__credentials)
4 changes: 4 additions & 0 deletions symbl/conversations_api/ConversationsApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ def get_questions(self, conversation_id, credentials=None):
def get_topics(self, conversation_id, credentials=None, parameters={}):
params = dictionary_to_valid_json(parameters)
return self.conversations_api_rest.get_topics_by_conversation_id(conversation_id, **correct_boolean_values(params))

@initialize_api_client
def get_conversation(self, conversation_id, credentials=None):
return self.conversations_api_rest.get_conversation_by_conversation_id(conversation_id)
38 changes: 23 additions & 15 deletions symbl/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ You can utilize different functions of Async APIs by directly utilizing `symbl.A
>returns conversation object
>
>click [here](https://github.com/symblai/symbl-python/blob/roshani_readme_changes/example/Async_API/Audio_API/process_audio_file.py) to check the example for usage of parameters/arguments and conversation object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Async_API/Audio_API/process_audio_file.py) to check the example for usage of parameters/arguments and conversation object
2. process_url(payload):
>Parameter Name | Required | Value
Expand All @@ -57,7 +57,7 @@ You can utilize different functions of Async APIs by directly utilizing `symbl.A
>returns conversation object
>
>click [here](https://github.com/symblai/symbl-python/blob/roshani_readme_changes/example/Async_API/Audio_API/process_audio_url.py) to check the example for usage of parameters/arguments and conversation object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Async_API/Audio_API/process_audio_url.py) to check the example for usage of parameters/arguments and conversation object
3. append_file(file_path, conversation_id):
>Parameter Name | Required | Value
Expand All @@ -71,7 +71,7 @@ You can utilize different functions of Async APIs by directly utilizing `symbl.A
>returns conversation object
>
>click [here](https://github.com/symblai/symbl-python/blob/roshani_readme_changes/example/Async_API/Audio_API/append_audio_file.py) to check the example for usage of parameters/arguments and conversation object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Async_API/Audio_API/append_audio_file.py) to check the example for usage of parameters/arguments and conversation object
4. append_url(payload, conversation_id):
>Parameter Name | Required | Value
Expand All @@ -84,7 +84,7 @@ You can utilize different functions of Async APIs by directly utilizing `symbl.A
>returns conversation object
>
>click [here](https://github.com/symblai/symbl-python/blob/roshani_readme_changes/example/Async_API/Audio_API/append_audio_url.py) to check the example for usage of parameters/arguments and conversation object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Async_API/Audio_API/append_audio_url.py) to check the example for usage of parameters/arguments and conversation object
# Video class

Expand All @@ -103,7 +103,7 @@ You can utilize different functions of Async APIs by directly utilizing `symbl.V
>returns conversation object
>
>click [here](https://github.com/symblai/symbl-python/blob/roshani_readme_changes/example/Async_API/Video_API/process_video_file.py) to check the example for usage of parameters/arguments and conversation object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Async_API/Video_API/process_video_file.py) to check the example for usage of parameters/arguments and conversation object
2. process_url(payload):
>Parameter Name | Required | Value
Expand All @@ -115,7 +115,7 @@ You can utilize different functions of Async APIs by directly utilizing `symbl.V
>returns conversation object
>
>click [here](https://github.com/symblai/symbl-python/blob/roshani_readme_changes/example/Async_API/Video_API/process_video_url.py) to check the example for usage of parameters/arguments and conversation object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Async_API/Video_API/process_video_url.py) to check the example for usage of parameters/arguments and conversation object
3. append_file(file_path, conversation_id):
>Parameter Name | Required | Value
Expand All @@ -129,7 +129,7 @@ You can utilize different functions of Async APIs by directly utilizing `symbl.V
>returns conversation object
>
>click [here](https://github.com/symblai/symbl-python/blob/roshani_readme_changes/example/Async_API/Video_API/append_video_file.py) to check the example for usage of parameters/arguments and conversation object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Async_API/Video_API/append_video_file.py) to check the example for usage of parameters/arguments and conversation object
4. append_url(payload, conversation_id):
>Parameter Name | Required | Value
Expand All @@ -142,7 +142,7 @@ You can utilize different functions of Async APIs by directly utilizing `symbl.V
>returns conversation object
>
>click [here](https://github.com/symblai/symbl-python/blob/roshani_readme_changes/example/Async_API/Video_API/append_video_url.py) to check the example for usage of parameters/arguments and conversation object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Async_API/Video_API/append_video_url.py) to check the example for usage of parameters/arguments and conversation object
# Text class

Symbl's Async APIs provide the functionality for processing textual content from a conversation. The data processed for these conversations are available via the Conversation APIs once the APIs have completed the processing.
Expand All @@ -160,7 +160,7 @@ You can utilize different functions of Async APIs by directly utilizing `symbl.T
>returns conversation object
>
>click [here](https://github.com/symblai/symbl-python/tree/roshani_readme_changes/example/Async_API/Text_API/process_text.py) to check the example for usage of parameters/arguments and conversation object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Async_API/Text_API/process_text.py) to check the example for usage of parameters/arguments and conversation object

2. append(payload, conversation_id):
Expand All @@ -174,7 +174,7 @@ You can utilize different functions of Async APIs by directly utilizing `symbl.T
>returns conversation object
>
>click [here](https://github.com/symblai/symbl-python/tree/roshani_readme_changes/example/Async_API/Text_API/append_text.py) to check the example for usage of parameters/arguments and conversation object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Async_API/Text_API/append_text.py) to check the example for usage of parameters/arguments and conversation object
## conversation object

Expand Down Expand Up @@ -206,6 +206,10 @@ Conversation object is returned by Async API Text, Audio and Video classes. The
>parameters:- (Optional) dictionary, takes a dictionary of parameters. For list of parameters accepted, please click [here](https://docs.symbl.ai/docs/conversation-api/get-topics#query-params)
>
>returns The most relevant topics of discussion from the conversation that is generated based on the combination of the overall scope of the discussion.
7. conversation.get_conversation():

>returns the conversation meta-data like meeting name, member name and email, start and end time of the meeting, meeting type and meeting id.
>
>example for demonstrate the use of conversation class
>
Expand Down Expand Up @@ -258,6 +262,10 @@ You can utilize different functions of Conversation APIs by directly utilizing `
>
>returns The most relevant topics of discussion from the conversation that is generated based on the combination of the overall scope of the discussion.
7. get_conversation(conversation_id)

>returns the conversation meta-data like meeting name, member name and email, start and end time of the meeting, meeting type and meeting id.
>example for demonstrate the use of conversation class
>
```
Expand All @@ -267,7 +275,7 @@ conversation_id=1234567890 # Update with the conversation Id of your conversatio
print(symbl.Conversations.get_messages(conversation_id))
```
>to access more insights click [here](https://github.com/symblai/symbl-python/tree/roshani_readme_changes/example/Conversation_Class/conversation_class.py)
>to access more insights click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Conversation_Class/conversation_class.py)
# Telephony class

Expand All @@ -287,7 +295,7 @@ Based on PSTN and SIP protocols, the Telephony API provides an interface for the
>returns connection object
>
>click [here](https://github.com/symblai/symbl-python/tree/roshani_readme_changes/example/Telephony_API/telephony_pstn.py) to check the example for usage of parameters/arguments and connection object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Telephony_API/telephony_pstn.py) to check the example for usage of parameters/arguments and connection object
>
>For more details check [here][telephony-docs]
Expand All @@ -305,7 +313,7 @@ Based on PSTN and SIP protocols, the Telephony API provides an interface for the
>returns connection object
>
>click [here](https://github.com/symblai/symbl-python/tree/roshani_readme_changes/example/Telephony_API/telephony_sip.py) to check the example for usage of parameters/arguments and connection object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Telephony_API/telephony_sip.py) to check the example for usage of parameters/arguments and connection object
>
>For more details check [here][telephony-docs]
Expand Down Expand Up @@ -347,15 +355,15 @@ Symbl's Streaming API is based on WebSocket protocol and can be used for real-ti
>Parameter Name | Required | Value
>--- | --- | ---
>credentials | optional | Don't add this parameter if you have `symbl.conf` file in your home directory or working directory
>speaker | Optional | speaker object containing name and email field
>speaker | Optional | speaker object containing `name` and `email` field
>insight_type | Optional | insight_types to be available in the websocket connection.
>config | optional | using this parameter you can pass confidenceThreshold, languageCode
>languages | optional | To provide the Language list explicitly
>timezone | optional | To provide timezone explicitly
>returns connection object
>
>click [here](https://github.com/symblai/symbl-python/tree/roshani_readme_changes/example/Streaming_API/streaming.py) to check the example for usage of parameters/arguments and connection object
>click [here](https://github.com/symblai/symbl-python/blob/roshani_Conversation_data_api/example/Streaming_API/streaming.py) to check the example for usage of parameters/arguments and connection object
>
>For more details check [here][streaming-docs]
Expand Down

0 comments on commit 3199192

Please sign in to comment.