Skip to content

Commit

Permalink
Feat/call score (#54)
Browse files Browse the repository at this point in the history
* call score api

* add features and metadata to async call & add callscore apis

* test for get call score

* add experience url call

---------

Co-authored-by: Manoj Mali <manojmali@Manojs-MacBook-Pro-2.local>
  • Loading branch information
MinsterMind and Manoj Mali authored Sep 4, 2024
1 parent 4db6543 commit 541ba3a
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 4 deletions.
12 changes: 12 additions & 0 deletions example/Async_API/Text_API/process_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
payload = {

"name": "TextAPI", # you can update the name of the conversation

"features": {
"featureList": [
"insights",
"callScore"
]
},
"metadata": {
"salesStage": "qualification",
"prospectName": "DeepMind AI"
},

#"trackers": trackers, #To detect the trackers

Expand Down Expand Up @@ -52,6 +63,7 @@

# To get the message from the conversation
print(conversation_object.get_messages())
print(conversation_object.get_call_score_status())

#To get the conversation data from the conversation
#print(conversation_object.get_conversation())
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
symbl_rest >= 1.0.11
symbl_rest >= 1.0.14
websocket-client >= 0.59.0
pyaudio ~= 0.2.12
numpy
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

setup(
name="symbl",
version="2.0.0",
version="2.0.5",
description="symbl.ai SDK",
author_email="info@symbl.ai",
url="",
keywords=["Symbl.ai SDK"],
install_requires=["symbl_rest >= 1.0.11", "websocket-client >= 0.59.0", "pyaudio ~= 0.2.12", "numpy"],
install_requires=["symbl_rest >= 1.0.14", "websocket-client >= 0.59.0", "pyaudio ~= 0.2.12", "numpy"],
packages=find_packages(),
include_package_data=True,
long_description="""\
Expand Down
8 changes: 8 additions & 0 deletions symbl/Conversations.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,12 @@ def delete_conversation(self):
@validate_conversation_id
def get_formatted_transcript(self, parameters={}):
return self.__conversation_api.get_formatted_transcript(self.__conversation_id,parameters,credentials=self.__credentials)

@validate_conversation_id
def get_call_score(self):
return self.__conversation_api.get_call_score(self.__conversation_id, credentials=self.__credentials)

@validate_conversation_id
def get_call_score_status(self):
return self.__conversation_api.get_call_score_status(self.__conversation_id, credentials=self.__credentials)

7 changes: 7 additions & 0 deletions symbl/callScore.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from conversations_api.ConversationsApi import ConversationsApi

conversations = ConversationsApi();

conversation_id=6750867925630976 # Update with the conversation Id of your conversation

print(conversations.get_call_score_insights_url(conversation_id))
25 changes: 24 additions & 1 deletion symbl/conversations_api/ConversationsApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,30 @@ def get_action_items(self, conversation_id, credentials=None):
return self.conversations_api_rest.get_action_items_by_conversation_id(conversation_id)
except:
return {'message': 'The conversationId is either invalid or does not exist.'}



@initialize_api_client
def get_call_score(self, conversation_id, credentials=None):
try:
return self.conversations_api_rest.get_call_score_by_conversation_id(conversation_id)
except:
return {'message': 'The conversationId is either invalid or does not exist.'}

@initialize_api_client
def get_call_score_insights_url(self, conversation_id, credentials=None):
try:
params = {'include_call_score': True}
return self.conversations_api_rest.get_experience_url_by_conversation_id(conversation_id, **correct_boolean_values(params))
except Exception as e:
return {'message': 'The conversationId is either invalid or does not exist.'}

@initialize_api_client
def get_call_score_status(self, conversation_id, credentials=None):
try:
res = self.conversations_api_rest.get_call_score_status_by_conversation_id(conversation_id)
return res
except Exception as e:
return {'message': 'The conversationId is either invalid or does not exist.'}

@initialize_api_client
def get_follow_ups(self, conversation_id, credentials=None ):
Expand Down

0 comments on commit 541ba3a

Please sign in to comment.