syllable-sdk 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- syllable_sdk-0.1.1/PKG-INFO +619 -0
- syllable_sdk-0.1.1/README-PYPI.md +598 -0
- syllable_sdk-0.1.1/py.typed +1 -0
- syllable_sdk-0.1.1/pyproject.toml +57 -0
- syllable_sdk-0.1.1/src/syllable_sdk/__init__.py +18 -0
- syllable_sdk-0.1.1/src/syllable_sdk/_hooks/__init__.py +5 -0
- syllable_sdk-0.1.1/src/syllable_sdk/_hooks/registration.py +13 -0
- syllable_sdk-0.1.1/src/syllable_sdk/_hooks/sdkhooks.py +76 -0
- syllable_sdk-0.1.1/src/syllable_sdk/_hooks/types.py +106 -0
- syllable_sdk-0.1.1/src/syllable_sdk/_version.py +15 -0
- syllable_sdk-0.1.1/src/syllable_sdk/agents.py +1447 -0
- syllable_sdk-0.1.1/src/syllable_sdk/basesdk.py +362 -0
- syllable_sdk-0.1.1/src/syllable_sdk/channels.py +965 -0
- syllable_sdk-0.1.1/src/syllable_sdk/channelstargets.py +260 -0
- syllable_sdk-0.1.1/src/syllable_sdk/conversations.py +254 -0
- syllable_sdk-0.1.1/src/syllable_sdk/custommessages.py +1148 -0
- syllable_sdk-0.1.1/src/syllable_sdk/dashboards.py +1217 -0
- syllable_sdk-0.1.1/src/syllable_sdk/datasources.py +1142 -0
- syllable_sdk-0.1.1/src/syllable_sdk/events.py +254 -0
- syllable_sdk-0.1.1/src/syllable_sdk/httpclient.py +136 -0
- syllable_sdk-0.1.1/src/syllable_sdk/insights.py +22 -0
- syllable_sdk-0.1.1/src/syllable_sdk/insights_tools.py +426 -0
- syllable_sdk-0.1.1/src/syllable_sdk/insightstools.py +714 -0
- syllable_sdk-0.1.1/src/syllable_sdk/insightsworkflows.py +894 -0
- syllable_sdk-0.1.1/src/syllable_sdk/languagegroups.py +1134 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/__init__.py +737 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agent_deleteop.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agent_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agent_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentcreate.py +148 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentlanguage.py +25 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentproperties.py +24 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentresponse.py +218 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentsttprovider.py +12 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agenttooldefaults.py +26 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agenttoolfielddefault.py +25 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentupdate.py +153 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentvoice.py +56 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentvoicedisplayname.py +47 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentvoicegender.py +11 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentvoicemodel.py +15 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentvoicevarname.py +47 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/agentwaitsound.py +12 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/apierror.py +22 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/available_targetsop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/availabletarget.py +53 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/availabletargetproperties.py +10 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channel.py +68 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channel_targets_createop.py +29 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channel_targets_deleteop.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channel_targets_get_by_idop.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channel_targets_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channel_targets_updateop.py +34 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channelproperties.py +11 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channels_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channelservices.py +13 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channeltargetcreaterequest.py +79 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channeltargetproperties.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channeltargetresponse.py +116 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/channeltargetupdaterequest.py +84 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/conversation.py +138 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/conversationproperties.py +17 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/conversations_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/custom_message_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/custom_messages_deleteop.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/custom_messages_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/custommessagecreaterequest.py +72 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/custommessageproperties.py +12 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/custommessageresponse.py +105 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/custommessagerule.py +85 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/custommessageupdaterequest.py +77 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/dashboard.py +38 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/dashboardproperties.py +12 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/dashboardresponse.py +34 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/dashboardtokenresponse.py +49 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/data_sources_deleteop.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/data_sources_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/data_sources_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/datasourcecreaterequest.py +78 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/datasourcedetailresponse.py +108 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/datasourcemetadataresponse.py +103 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/datasourceproperties.py +14 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/datasourceupdaterequest.py +88 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/dayofweek.py +14 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/directory_workflow_deleteop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/event.py +130 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/eventproperties.py +17 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/events_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/generate_session_recording_urlsop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/httpvalidationerror.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insight_tool_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insight_tool_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insights_tool_updateop.py +23 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insights_workflow_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insights_workflow_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insights_workflow_updateop.py +23 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insighttooldefinition.py +56 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insighttoolinput.py +43 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insighttooloutput.py +108 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insighttoolproperties.py +13 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insightworkflowinput.py +44 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insightworkflowoutput.py +71 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/insightworkflowproperties.py +14 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/internaltool.py +42 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/language_groups_deleteop.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/language_groups_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/language_groups_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/languagecode.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/languageconfig.py +41 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/languagegroupagentinfo.py +24 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/languagegroupcreaterequest.py +69 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/languagegroupproperties.py +12 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/languagegroupresponse.py +99 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/languagegroupupdaterequest.py +79 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_agentresponse_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_availabletarget_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_channel_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_channeltargetresponse_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_conversation_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_custommessageresponse_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_dashboardresponse_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_datasourcemetadataresponse_.py +67 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_event_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_insighttooloutput_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_insightworkflowoutput_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_languagegroupresponse_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_promptresponse_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_serviceresponse_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_session_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_sessionlabel_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/listresponse_toolresponse_.py +64 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/orderbydirection.py +9 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/post_get_dashboardop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/post_list_dashboardop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/promptcreaterequest.py +82 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/prompthistory.py +92 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/promptllmconfig.py +69 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/promptllmprovider.py +11 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/promptproperties.py +17 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/promptresponse.py +126 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/prompts_deleteop.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/prompts_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/prompts_historyop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/prompts_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/promptupdaterequest.py +98 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/security.py +25 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/service_deleteop.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/service_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/servicecreaterequest.py +20 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/serviceproperties.py +12 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/serviceresponse.py +88 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/services_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/serviceupdaterequest.py +67 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/session.py +185 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/session_full_summary_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/session_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/session_label_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/session_labels_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/session_recording_streamop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/session_summary_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/session_transcript_get_by_idop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/sessionaction.py +72 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/sessionlabel.py +96 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/sessionlabelcreate.py +78 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/sessionlabelproperties.py +14 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/sessionproperties.py +23 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/sessionrecordingresponse.py +62 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/sessions_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/sessionsummaryresponse.py +61 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/sessiontext.py +72 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/sessiontranscriptionresponse.py +32 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/statictoolparameter.py +78 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/statictoolparametertype.py +13 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/targetmodes.py +13 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/testmessage.py +96 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/testmessageresponse.py +50 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/tool_deleteop.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/tool_get_by_nameop.py +16 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/tool_listop.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolagentinfo.py +24 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolargumentlocation.py +18 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolcreaterequest.py +26 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/tooldefinition.py +116 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/tooldetailresponse.py +127 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolfunction.py +38 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolhttpendpoint.py +41 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolhttpmethod.py +11 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolparameterdefault.py +33 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolparametertransform.py +96 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolparametertransformcondition.py +69 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolpromptinfo.py +24 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolproperties.py +14 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolresponse.py +122 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/toolupdaterequest.py +73 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/ttsprovider.py +12 -0
- syllable_sdk-0.1.1/src/syllable_sdk/models/validationerror.py +26 -0
- syllable_sdk-0.1.1/src/syllable_sdk/prompts.py +1354 -0
- syllable_sdk-0.1.1/src/syllable_sdk/py.typed +1 -0
- syllable_sdk-0.1.1/src/syllable_sdk/recording.py +204 -0
- syllable_sdk-0.1.1/src/syllable_sdk/sdk.py +222 -0
- syllable_sdk-0.1.1/src/syllable_sdk/sdkconfiguration.py +56 -0
- syllable_sdk-0.1.1/src/syllable_sdk/services.py +1096 -0
- syllable_sdk-0.1.1/src/syllable_sdk/sessionlabels.py +680 -0
- syllable_sdk-0.1.1/src/syllable_sdk/sessions.py +859 -0
- syllable_sdk-0.1.1/src/syllable_sdk/summary.py +204 -0
- syllable_sdk-0.1.1/src/syllable_sdk/targets.py +476 -0
- syllable_sdk-0.1.1/src/syllable_sdk/test.py +258 -0
- syllable_sdk-0.1.1/src/syllable_sdk/tools.py +1104 -0
- syllable_sdk-0.1.1/src/syllable_sdk/transcript.py +208 -0
- syllable_sdk-0.1.1/src/syllable_sdk/types/__init__.py +21 -0
- syllable_sdk-0.1.1/src/syllable_sdk/types/basemodel.py +39 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/__init__.py +101 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/annotations.py +55 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/enums.py +34 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/eventstreaming.py +238 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/forms.py +202 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/headers.py +136 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/logger.py +27 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/metadata.py +118 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/queryparams.py +205 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/requestbodies.py +66 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/retries.py +217 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/security.py +192 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/serializers.py +219 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/url.py +155 -0
- syllable_sdk-0.1.1/src/syllable_sdk/utils/values.py +137 -0
- syllable_sdk-0.1.1/src/syllable_sdk/v1.py +1215 -0
- syllable_sdk-0.1.1/src/syllable_sdk/workflows.py +268 -0
|
@@ -0,0 +1,619 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: syllable-sdk
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
|
+
Author: Speakeasy
|
|
6
|
+
Requires-Python: >=3.9
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Requires-Dist: eval-type-backport (>=0.2.0)
|
|
14
|
+
Requires-Dist: httpx (>=0.28.1)
|
|
15
|
+
Requires-Dist: pydantic (>=2.10.3)
|
|
16
|
+
Requires-Dist: python-dateutil (>=2.8.2)
|
|
17
|
+
Requires-Dist: typing-inspection (>=0.4.0)
|
|
18
|
+
Project-URL: Repository, https://github.com/asksyllable/syllable-sdk-python.git
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# syllable-sdk-python
|
|
22
|
+
<!-- Start Summary [summary] -->
|
|
23
|
+
## Summary
|
|
24
|
+
|
|
25
|
+
SyllableSDK:
|
|
26
|
+
# Syllable Platform SDK
|
|
27
|
+
|
|
28
|
+
Syllable SDK gives you the power of awesome AI agentry. 🚀
|
|
29
|
+
|
|
30
|
+
## Overview
|
|
31
|
+
|
|
32
|
+
The Syllable SDK provides a comprehensive set of tools and APIs to integrate powerful AI
|
|
33
|
+
capabilities into your communication applications. Whether you're building chatbots, virtual
|
|
34
|
+
assistants, or any other AI-driven solutions, Syllable SDK has got you covered.
|
|
35
|
+
|
|
36
|
+
## Features
|
|
37
|
+
|
|
38
|
+
- **Natural Language Processing (NLP)**: Understand and generate human language with ease.
|
|
39
|
+
- **Machine Learning Models**: Leverage pre-trained models or train your own custom models.
|
|
40
|
+
- **Speech Recognition**: Convert speech to text and vice versa.
|
|
41
|
+
- **Data Analytics**: Analyze and visualize data to gain insights.
|
|
42
|
+
- **Integration**: Seamlessly integrate with other services and platforms.
|
|
43
|
+
<!-- End Summary [summary] -->
|
|
44
|
+
|
|
45
|
+
<!-- Start Table of Contents [toc] -->
|
|
46
|
+
## Table of Contents
|
|
47
|
+
<!-- $toc-max-depth=2 -->
|
|
48
|
+
* [syllable-sdk-python](https://github.com/asksyllable/syllable-sdk-python/blob/master/#syllable-sdk-python)
|
|
49
|
+
* [Syllable Platform SDK](https://github.com/asksyllable/syllable-sdk-python/blob/master/#syllable-platform-sdk)
|
|
50
|
+
* [Overview](https://github.com/asksyllable/syllable-sdk-python/blob/master/#overview)
|
|
51
|
+
* [Features](https://github.com/asksyllable/syllable-sdk-python/blob/master/#features)
|
|
52
|
+
* [SDK Installation](https://github.com/asksyllable/syllable-sdk-python/blob/master/#sdk-installation)
|
|
53
|
+
* [IDE Support](https://github.com/asksyllable/syllable-sdk-python/blob/master/#ide-support)
|
|
54
|
+
* [SDK Example Usage](https://github.com/asksyllable/syllable-sdk-python/blob/master/#sdk-example-usage)
|
|
55
|
+
* [Authentication](https://github.com/asksyllable/syllable-sdk-python/blob/master/#authentication)
|
|
56
|
+
* [Available Resources and Operations](https://github.com/asksyllable/syllable-sdk-python/blob/master/#available-resources-and-operations)
|
|
57
|
+
* [Retries](https://github.com/asksyllable/syllable-sdk-python/blob/master/#retries)
|
|
58
|
+
* [Error Handling](https://github.com/asksyllable/syllable-sdk-python/blob/master/#error-handling)
|
|
59
|
+
* [Server Selection](https://github.com/asksyllable/syllable-sdk-python/blob/master/#server-selection)
|
|
60
|
+
* [Custom HTTP Client](https://github.com/asksyllable/syllable-sdk-python/blob/master/#custom-http-client)
|
|
61
|
+
* [Resource Management](https://github.com/asksyllable/syllable-sdk-python/blob/master/#resource-management)
|
|
62
|
+
* [Debugging](https://github.com/asksyllable/syllable-sdk-python/blob/master/#debugging)
|
|
63
|
+
|
|
64
|
+
<!-- End Table of Contents [toc] -->
|
|
65
|
+
|
|
66
|
+
<!-- Start SDK Installation [installation] -->
|
|
67
|
+
## SDK Installation
|
|
68
|
+
|
|
69
|
+
> [!TIP]
|
|
70
|
+
> To finish publishing your SDK to PyPI you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
> [!NOTE]
|
|
74
|
+
> **Python version upgrade policy**
|
|
75
|
+
>
|
|
76
|
+
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
|
|
77
|
+
|
|
78
|
+
The SDK can be installed with either *pip* or *poetry* package managers.
|
|
79
|
+
|
|
80
|
+
### PIP
|
|
81
|
+
|
|
82
|
+
*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
pip install git+https://github.com/asksyllable/syllable-sdk-python.git
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Poetry
|
|
89
|
+
|
|
90
|
+
*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
poetry add git+https://github.com/asksyllable/syllable-sdk-python.git
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Shell and script usage with `uv`
|
|
97
|
+
|
|
98
|
+
You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
|
|
99
|
+
|
|
100
|
+
```shell
|
|
101
|
+
uvx --from syllable-sdk python
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
It's also possible to write a standalone Python script without needing to set up a whole project like so:
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
#!/usr/bin/env -S uv run --script
|
|
108
|
+
# /// script
|
|
109
|
+
# requires-python = ">=3.9"
|
|
110
|
+
# dependencies = [
|
|
111
|
+
# "syllable-sdk",
|
|
112
|
+
# ]
|
|
113
|
+
# ///
|
|
114
|
+
|
|
115
|
+
from syllable_sdk import SyllableSDK
|
|
116
|
+
|
|
117
|
+
sdk = SyllableSDK(
|
|
118
|
+
# SDK arguments
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
# Rest of script here...
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Once that is saved to a file, you can run it with `uv run script.py` where
|
|
125
|
+
`script.py` can be replaced with the actual file name.
|
|
126
|
+
<!-- End SDK Installation [installation] -->
|
|
127
|
+
|
|
128
|
+
<!-- Start IDE Support [idesupport] -->
|
|
129
|
+
## IDE Support
|
|
130
|
+
|
|
131
|
+
### PyCharm
|
|
132
|
+
|
|
133
|
+
Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
|
|
134
|
+
|
|
135
|
+
- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
|
|
136
|
+
<!-- End IDE Support [idesupport] -->
|
|
137
|
+
|
|
138
|
+
<!-- Start SDK Example Usage [usage] -->
|
|
139
|
+
## SDK Example Usage
|
|
140
|
+
|
|
141
|
+
### Example
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
# Synchronous Example
|
|
145
|
+
import os
|
|
146
|
+
from syllable_sdk import SyllableSDK
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
with SyllableSDK(
|
|
150
|
+
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
|
|
151
|
+
) as ss_client:
|
|
152
|
+
|
|
153
|
+
res = ss_client.agents.list()
|
|
154
|
+
|
|
155
|
+
# Handle response
|
|
156
|
+
print(res)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
</br>
|
|
160
|
+
|
|
161
|
+
The same SDK client can also be used to make asychronous requests by importing asyncio.
|
|
162
|
+
```python
|
|
163
|
+
# Asynchronous Example
|
|
164
|
+
import asyncio
|
|
165
|
+
import os
|
|
166
|
+
from syllable_sdk import SyllableSDK
|
|
167
|
+
|
|
168
|
+
async def main():
|
|
169
|
+
|
|
170
|
+
async with SyllableSDK(
|
|
171
|
+
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
|
|
172
|
+
) as ss_client:
|
|
173
|
+
|
|
174
|
+
res = await ss_client.agents.list_async()
|
|
175
|
+
|
|
176
|
+
# Handle response
|
|
177
|
+
print(res)
|
|
178
|
+
|
|
179
|
+
asyncio.run(main())
|
|
180
|
+
```
|
|
181
|
+
<!-- End SDK Example Usage [usage] -->
|
|
182
|
+
|
|
183
|
+
<!-- Start Authentication [security] -->
|
|
184
|
+
## Authentication
|
|
185
|
+
|
|
186
|
+
### Per-Client Security Schemes
|
|
187
|
+
|
|
188
|
+
This SDK supports the following security scheme globally:
|
|
189
|
+
|
|
190
|
+
| Name | Type | Scheme | Environment Variable |
|
|
191
|
+
| ---------------- | ------ | ------- | ---------------------------- |
|
|
192
|
+
| `api_key_header` | apiKey | API key | `SYLLABLESDK_API_KEY_HEADER` |
|
|
193
|
+
|
|
194
|
+
To authenticate with the API the `api_key_header` parameter must be set when initializing the SDK client instance. For example:
|
|
195
|
+
```python
|
|
196
|
+
import os
|
|
197
|
+
from syllable_sdk import SyllableSDK
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
with SyllableSDK(
|
|
201
|
+
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
|
|
202
|
+
) as ss_client:
|
|
203
|
+
|
|
204
|
+
res = ss_client.agents.list()
|
|
205
|
+
|
|
206
|
+
# Handle response
|
|
207
|
+
print(res)
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
<!-- End Authentication [security] -->
|
|
211
|
+
|
|
212
|
+
<!-- Start Available Resources and Operations [operations] -->
|
|
213
|
+
## Available Resources and Operations
|
|
214
|
+
|
|
215
|
+
<details open>
|
|
216
|
+
<summary>Available methods</summary>
|
|
217
|
+
|
|
218
|
+
### [agents](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/agents/README.md)
|
|
219
|
+
|
|
220
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/agents/README.md#list) - Agent List
|
|
221
|
+
* [create](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/agents/README.md#create) - Create Agent
|
|
222
|
+
* [update](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/agents/README.md#update) - Update Agent
|
|
223
|
+
* [get_by_id](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/agents/README.md#get_by_id) - Get Agent By Id
|
|
224
|
+
* [delete](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/agents/README.md#delete) - Delete Agent
|
|
225
|
+
* [get_available_voices](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/agents/README.md#get_available_voices) - Get Available Agent Voices
|
|
226
|
+
|
|
227
|
+
#### [agents.test](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/test/README.md)
|
|
228
|
+
|
|
229
|
+
* [send_message](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/test/README.md#send_message) - Send New Message
|
|
230
|
+
|
|
231
|
+
### [channels](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/channels/README.md)
|
|
232
|
+
|
|
233
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/channels/README.md#list) - Get Channels
|
|
234
|
+
* [list_targets](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/channels/README.md#list_targets) - Get Channel Targets
|
|
235
|
+
* [assign_target](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/channels/README.md#assign_target) - Assign A Channel Target
|
|
236
|
+
* [delete](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/channels/README.md#delete) - Delete Channel Target
|
|
237
|
+
|
|
238
|
+
#### [channels.targets](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/targets/README.md)
|
|
239
|
+
|
|
240
|
+
* [get](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/targets/README.md#get) - Get A Channel Target
|
|
241
|
+
* [update](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/targets/README.md#update) - Edit Channel Target
|
|
242
|
+
|
|
243
|
+
### [channels_targets](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/channelstargets/README.md)
|
|
244
|
+
|
|
245
|
+
* [list_available](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/channelstargets/README.md#list_available) - Available Targets List
|
|
246
|
+
|
|
247
|
+
### [conversations](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/conversations/README.md)
|
|
248
|
+
|
|
249
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/conversations/README.md#list) - Conversations List
|
|
250
|
+
|
|
251
|
+
### [custom_messages](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/custommessages/README.md)
|
|
252
|
+
|
|
253
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/custommessages/README.md#list) - Custom Messages List
|
|
254
|
+
* [create](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/custommessages/README.md#create) - Create Custom Message
|
|
255
|
+
* [update](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/custommessages/README.md#update) - Update Custom Message
|
|
256
|
+
* [get](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/custommessages/README.md#get) - Get Custom Message By Id
|
|
257
|
+
* [delete](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/custommessages/README.md#delete) - Delete Custom Message
|
|
258
|
+
|
|
259
|
+
### [dashboards](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/dashboards/README.md)
|
|
260
|
+
|
|
261
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/dashboards/README.md#list) - Post List Dashboards
|
|
262
|
+
* [fetch_info](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/dashboards/README.md#fetch_info) - Post Fetch Info
|
|
263
|
+
* [~~session_events~~](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/dashboards/README.md#session_events) - Post Session Events :warning: **Deprecated**
|
|
264
|
+
* [~~post_session_summary~~](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/dashboards/README.md#post_session_summary) - Post Session Summary :warning: **Deprecated**
|
|
265
|
+
* [~~post_session_transfers~~](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/dashboards/README.md#post_session_transfers) - Post Session Transfers :warning: **Deprecated**
|
|
266
|
+
* [~~post_sessions~~](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/dashboards/README.md#post_sessions) - Post Sessions :warning: **Deprecated**
|
|
267
|
+
|
|
268
|
+
### [data_sources](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/datasources/README.md)
|
|
269
|
+
|
|
270
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/datasources/README.md#list) - List Data Sources
|
|
271
|
+
* [create](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/datasources/README.md#create) - Create Data Source
|
|
272
|
+
* [update](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/datasources/README.md#update) - Update Data Source
|
|
273
|
+
* [get](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/datasources/README.md#get) - Get Data Source
|
|
274
|
+
* [delete](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/datasources/README.md#delete) - Delete Data Source
|
|
275
|
+
|
|
276
|
+
### [events](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/events/README.md)
|
|
277
|
+
|
|
278
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/events/README.md#list) - Events List
|
|
279
|
+
|
|
280
|
+
### [insights](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insights/README.md)
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
#### [insights.tools](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightstools/README.md)
|
|
284
|
+
|
|
285
|
+
* [create](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightstools/README.md#create) - Create Insight Tool
|
|
286
|
+
* [get_definitions](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightstools/README.md#get_definitions) - Get Insight Tool Definitions
|
|
287
|
+
|
|
288
|
+
#### [insights.workflows](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/workflows/README.md)
|
|
289
|
+
|
|
290
|
+
* [update](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/workflows/README.md#update) - Update Insights Workflow
|
|
291
|
+
|
|
292
|
+
### [insights_tools](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightstools/README.md)
|
|
293
|
+
|
|
294
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightstools/README.md#list) - Insight Tool List
|
|
295
|
+
* [get](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightstools/README.md#get) - Get Insight Tool By Id
|
|
296
|
+
* [update](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightstools/README.md#update) - Update Insights Tool
|
|
297
|
+
|
|
298
|
+
### [insights_workflows](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightsworkflows/README.md)
|
|
299
|
+
|
|
300
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightsworkflows/README.md#list) - Insight Workflow List
|
|
301
|
+
* [create](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightsworkflows/README.md#create) - Create Insight Workflow
|
|
302
|
+
* [get](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightsworkflows/README.md#get) - Get Insight Workflow By Id
|
|
303
|
+
* [delete](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/insightsworkflows/README.md#delete) - Delete Insights Workflow
|
|
304
|
+
|
|
305
|
+
### [language_groups](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/languagegroups/README.md)
|
|
306
|
+
|
|
307
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/languagegroups/README.md#list) - List Language Groups
|
|
308
|
+
* [create](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/languagegroups/README.md#create) - Create Language Group
|
|
309
|
+
* [update](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/languagegroups/README.md#update) - Update Language Group
|
|
310
|
+
* [get_by_id](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/languagegroups/README.md#get_by_id) - Get Language Group
|
|
311
|
+
* [delete](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/languagegroups/README.md#delete) - Delete Language Group
|
|
312
|
+
|
|
313
|
+
### [prompts](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/prompts/README.md)
|
|
314
|
+
|
|
315
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/prompts/README.md#list) - Prompt List
|
|
316
|
+
* [create](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/prompts/README.md#create) - Create Prompt
|
|
317
|
+
* [update](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/prompts/README.md#update) - Update Prompt
|
|
318
|
+
* [get_by_id](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/prompts/README.md#get_by_id) - Get Prompt By Id
|
|
319
|
+
* [delete](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/prompts/README.md#delete) - Delete Prompt
|
|
320
|
+
* [history](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/prompts/README.md#history) - Get Prompt History
|
|
321
|
+
|
|
322
|
+
### [services](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/services/README.md)
|
|
323
|
+
|
|
324
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/services/README.md#list) - Service List
|
|
325
|
+
* [create](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/services/README.md#create) - Create Service
|
|
326
|
+
* [update](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/services/README.md#update) - Update Service
|
|
327
|
+
* [get](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/services/README.md#get) - Get Service By Id
|
|
328
|
+
* [delete](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/services/README.md#delete) - Delete Service
|
|
329
|
+
|
|
330
|
+
### [session_labels](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/sessionlabels/README.md)
|
|
331
|
+
|
|
332
|
+
* [get](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/sessionlabels/README.md#get) - Get Label By Id
|
|
333
|
+
* [create](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/sessionlabels/README.md#create) - Create Label
|
|
334
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/sessionlabels/README.md#list) - Session Labels List
|
|
335
|
+
|
|
336
|
+
### [sessions](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/sessions/README.md)
|
|
337
|
+
|
|
338
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/sessions/README.md#list) - Sessions List
|
|
339
|
+
* [get_full_summary](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/sessions/README.md#get_full_summary) - Get Full Session Summary By Id
|
|
340
|
+
* [get_by_id](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/sessions/README.md#get_by_id) - Get A Single Session By Id
|
|
341
|
+
* [stream_recording](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/sessions/README.md#stream_recording) - Stream Recording
|
|
342
|
+
|
|
343
|
+
#### [sessions.recording](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/recording/README.md)
|
|
344
|
+
|
|
345
|
+
* [generate_urls](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/recording/README.md#generate_urls) - Generate Recording Urls
|
|
346
|
+
|
|
347
|
+
#### [sessions.summary](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/summary/README.md)
|
|
348
|
+
|
|
349
|
+
* [get_by_id](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/summary/README.md#get_by_id) - Get Session Summary By Id
|
|
350
|
+
|
|
351
|
+
#### [sessions.transcript](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/transcript/README.md)
|
|
352
|
+
|
|
353
|
+
* [get](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/transcript/README.md#get) - Get Session Transcript By Id
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
### [tools](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/tools/README.md)
|
|
357
|
+
|
|
358
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/tools/README.md#list) - Tool List
|
|
359
|
+
* [create](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/tools/README.md#create) - Create Tool
|
|
360
|
+
* [update](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/tools/README.md#update) - Update Tool
|
|
361
|
+
* [get_by_name](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/tools/README.md#get_by_name) - Tool Info
|
|
362
|
+
* [delete](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/tools/README.md#delete) - Delete Tool
|
|
363
|
+
|
|
364
|
+
### [v1](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/v1/README.md)
|
|
365
|
+
|
|
366
|
+
* [list](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/v1/README.md#list) - Post List Dashboards
|
|
367
|
+
* [fetch_info](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/v1/README.md#fetch_info) - Post Fetch Info
|
|
368
|
+
* [~~session_events~~](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/v1/README.md#session_events) - Post Session Events :warning: **Deprecated**
|
|
369
|
+
* [~~post_session_summary~~](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/v1/README.md#post_session_summary) - Post Session Summary :warning: **Deprecated**
|
|
370
|
+
* [~~post_session_transfers~~](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/v1/README.md#post_session_transfers) - Post Session Transfers :warning: **Deprecated**
|
|
371
|
+
* [~~post_sessions~~](https://github.com/asksyllable/syllable-sdk-python/blob/master/docs/sdks/v1/README.md#post_sessions) - Post Sessions :warning: **Deprecated**
|
|
372
|
+
|
|
373
|
+
</details>
|
|
374
|
+
<!-- End Available Resources and Operations [operations] -->
|
|
375
|
+
|
|
376
|
+
<!-- Start Retries [retries] -->
|
|
377
|
+
## Retries
|
|
378
|
+
|
|
379
|
+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
|
|
380
|
+
|
|
381
|
+
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
|
|
382
|
+
```python
|
|
383
|
+
import os
|
|
384
|
+
from syllable_sdk import SyllableSDK
|
|
385
|
+
from syllable_sdk.utils import BackoffStrategy, RetryConfig
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
with SyllableSDK(
|
|
389
|
+
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
|
|
390
|
+
) as ss_client:
|
|
391
|
+
|
|
392
|
+
res = ss_client.agents.list(,
|
|
393
|
+
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
|
394
|
+
|
|
395
|
+
# Handle response
|
|
396
|
+
print(res)
|
|
397
|
+
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
|
|
401
|
+
```python
|
|
402
|
+
import os
|
|
403
|
+
from syllable_sdk import SyllableSDK
|
|
404
|
+
from syllable_sdk.utils import BackoffStrategy, RetryConfig
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
with SyllableSDK(
|
|
408
|
+
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
|
|
409
|
+
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
|
|
410
|
+
) as ss_client:
|
|
411
|
+
|
|
412
|
+
res = ss_client.agents.list()
|
|
413
|
+
|
|
414
|
+
# Handle response
|
|
415
|
+
print(res)
|
|
416
|
+
|
|
417
|
+
```
|
|
418
|
+
<!-- End Retries [retries] -->
|
|
419
|
+
|
|
420
|
+
<!-- Start Error Handling [errors] -->
|
|
421
|
+
## Error Handling
|
|
422
|
+
|
|
423
|
+
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
|
|
424
|
+
|
|
425
|
+
By default, an API error will raise a models.APIError exception, which has the following properties:
|
|
426
|
+
|
|
427
|
+
| Property | Type | Description |
|
|
428
|
+
|-----------------|------------------|-----------------------|
|
|
429
|
+
| `.status_code` | *int* | The HTTP status code |
|
|
430
|
+
| `.message` | *str* | The error message |
|
|
431
|
+
| `.raw_response` | *httpx.Response* | The raw HTTP response |
|
|
432
|
+
| `.body` | *str* | The response content |
|
|
433
|
+
|
|
434
|
+
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `list_async` method may raise the following exceptions:
|
|
435
|
+
|
|
436
|
+
| Error Type | Status Code | Content Type |
|
|
437
|
+
| -------------------------- | ----------- | ---------------- |
|
|
438
|
+
| models.HTTPValidationError | 422 | application/json |
|
|
439
|
+
| models.APIError | 4XX, 5XX | \*/\* |
|
|
440
|
+
|
|
441
|
+
### Example
|
|
442
|
+
|
|
443
|
+
```python
|
|
444
|
+
import os
|
|
445
|
+
from syllable_sdk import SyllableSDK, models
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
with SyllableSDK(
|
|
449
|
+
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
|
|
450
|
+
) as ss_client:
|
|
451
|
+
res = None
|
|
452
|
+
try:
|
|
453
|
+
|
|
454
|
+
res = ss_client.agents.list()
|
|
455
|
+
|
|
456
|
+
# Handle response
|
|
457
|
+
print(res)
|
|
458
|
+
|
|
459
|
+
except models.HTTPValidationError as e:
|
|
460
|
+
# handle e.data: models.HTTPValidationErrorData
|
|
461
|
+
raise(e)
|
|
462
|
+
except models.APIError as e:
|
|
463
|
+
# handle exception
|
|
464
|
+
raise(e)
|
|
465
|
+
```
|
|
466
|
+
<!-- End Error Handling [errors] -->
|
|
467
|
+
|
|
468
|
+
<!-- Start Server Selection [server] -->
|
|
469
|
+
## Server Selection
|
|
470
|
+
|
|
471
|
+
### Override Server URL Per-Client
|
|
472
|
+
|
|
473
|
+
The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
|
|
474
|
+
```python
|
|
475
|
+
import os
|
|
476
|
+
from syllable_sdk import SyllableSDK
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
with SyllableSDK(
|
|
480
|
+
server_url="https://api.syllable.cloud",
|
|
481
|
+
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
|
|
482
|
+
) as ss_client:
|
|
483
|
+
|
|
484
|
+
res = ss_client.agents.list()
|
|
485
|
+
|
|
486
|
+
# Handle response
|
|
487
|
+
print(res)
|
|
488
|
+
|
|
489
|
+
```
|
|
490
|
+
<!-- End Server Selection [server] -->
|
|
491
|
+
|
|
492
|
+
<!-- Start Custom HTTP Client [http-client] -->
|
|
493
|
+
## Custom HTTP Client
|
|
494
|
+
|
|
495
|
+
The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
|
|
496
|
+
Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
|
|
497
|
+
This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
|
|
498
|
+
|
|
499
|
+
For example, you could specify a header for every request that this sdk makes as follows:
|
|
500
|
+
```python
|
|
501
|
+
from syllable_sdk import SyllableSDK
|
|
502
|
+
import httpx
|
|
503
|
+
|
|
504
|
+
http_client = httpx.Client(headers={"x-custom-header": "someValue"})
|
|
505
|
+
s = SyllableSDK(client=http_client)
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
or you could wrap the client with your own custom logic:
|
|
509
|
+
```python
|
|
510
|
+
from syllable_sdk import SyllableSDK
|
|
511
|
+
from syllable_sdk.httpclient import AsyncHttpClient
|
|
512
|
+
import httpx
|
|
513
|
+
|
|
514
|
+
class CustomClient(AsyncHttpClient):
|
|
515
|
+
client: AsyncHttpClient
|
|
516
|
+
|
|
517
|
+
def __init__(self, client: AsyncHttpClient):
|
|
518
|
+
self.client = client
|
|
519
|
+
|
|
520
|
+
async def send(
|
|
521
|
+
self,
|
|
522
|
+
request: httpx.Request,
|
|
523
|
+
*,
|
|
524
|
+
stream: bool = False,
|
|
525
|
+
auth: Union[
|
|
526
|
+
httpx._types.AuthTypes, httpx._client.UseClientDefault, None
|
|
527
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
528
|
+
follow_redirects: Union[
|
|
529
|
+
bool, httpx._client.UseClientDefault
|
|
530
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
531
|
+
) -> httpx.Response:
|
|
532
|
+
request.headers["Client-Level-Header"] = "added by client"
|
|
533
|
+
|
|
534
|
+
return await self.client.send(
|
|
535
|
+
request, stream=stream, auth=auth, follow_redirects=follow_redirects
|
|
536
|
+
)
|
|
537
|
+
|
|
538
|
+
def build_request(
|
|
539
|
+
self,
|
|
540
|
+
method: str,
|
|
541
|
+
url: httpx._types.URLTypes,
|
|
542
|
+
*,
|
|
543
|
+
content: Optional[httpx._types.RequestContent] = None,
|
|
544
|
+
data: Optional[httpx._types.RequestData] = None,
|
|
545
|
+
files: Optional[httpx._types.RequestFiles] = None,
|
|
546
|
+
json: Optional[Any] = None,
|
|
547
|
+
params: Optional[httpx._types.QueryParamTypes] = None,
|
|
548
|
+
headers: Optional[httpx._types.HeaderTypes] = None,
|
|
549
|
+
cookies: Optional[httpx._types.CookieTypes] = None,
|
|
550
|
+
timeout: Union[
|
|
551
|
+
httpx._types.TimeoutTypes, httpx._client.UseClientDefault
|
|
552
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
553
|
+
extensions: Optional[httpx._types.RequestExtensions] = None,
|
|
554
|
+
) -> httpx.Request:
|
|
555
|
+
return self.client.build_request(
|
|
556
|
+
method,
|
|
557
|
+
url,
|
|
558
|
+
content=content,
|
|
559
|
+
data=data,
|
|
560
|
+
files=files,
|
|
561
|
+
json=json,
|
|
562
|
+
params=params,
|
|
563
|
+
headers=headers,
|
|
564
|
+
cookies=cookies,
|
|
565
|
+
timeout=timeout,
|
|
566
|
+
extensions=extensions,
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
s = SyllableSDK(async_client=CustomClient(httpx.AsyncClient()))
|
|
570
|
+
```
|
|
571
|
+
<!-- End Custom HTTP Client [http-client] -->
|
|
572
|
+
|
|
573
|
+
<!-- Start Resource Management [resource-management] -->
|
|
574
|
+
## Resource Management
|
|
575
|
+
|
|
576
|
+
The `SyllableSDK` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
|
|
577
|
+
|
|
578
|
+
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
|
|
579
|
+
|
|
580
|
+
```python
|
|
581
|
+
import os
|
|
582
|
+
from syllable_sdk import SyllableSDK
|
|
583
|
+
def main():
|
|
584
|
+
|
|
585
|
+
with SyllableSDK(
|
|
586
|
+
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
|
|
587
|
+
) as ss_client:
|
|
588
|
+
# Rest of application here...
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
# Or when using async:
|
|
592
|
+
async def amain():
|
|
593
|
+
|
|
594
|
+
async with SyllableSDK(
|
|
595
|
+
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
|
|
596
|
+
) as ss_client:
|
|
597
|
+
# Rest of application here...
|
|
598
|
+
```
|
|
599
|
+
<!-- End Resource Management [resource-management] -->
|
|
600
|
+
|
|
601
|
+
<!-- Start Debugging [debug] -->
|
|
602
|
+
## Debugging
|
|
603
|
+
|
|
604
|
+
You can setup your SDK to emit debug logs for SDK requests and responses.
|
|
605
|
+
|
|
606
|
+
You can pass your own logger class directly into your SDK.
|
|
607
|
+
```python
|
|
608
|
+
from syllable_sdk import SyllableSDK
|
|
609
|
+
import logging
|
|
610
|
+
|
|
611
|
+
logging.basicConfig(level=logging.DEBUG)
|
|
612
|
+
s = SyllableSDK(debug_logger=logging.getLogger("syllable_sdk"))
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
You can also enable a default debug logger by setting an environment variable `SYLLABLESDK_DEBUG` to true.
|
|
616
|
+
<!-- End Debugging [debug] -->
|
|
617
|
+
|
|
618
|
+
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
|
619
|
+
|