Skip to content

Commit

Permalink
Release 0.0.28
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Nov 30, 2023
1 parent 75fffe1 commit 123717e
Show file tree
Hide file tree
Showing 21 changed files with 192 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "vocode-api"
version = "0.0.27"
version = "0.0.28"
description = ""
readme = "README.md"
authors = []
Expand Down
18 changes: 18 additions & 0 deletions src/vocode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
AgentParamsActionsItemOne_ActionTransferCall,
AgentParamsEndpointingSensitivity,
AgentParamsIvrNavigationMode,
AgentParamsOpenaiAccountConnection,
AgentParamsPrompt,
AgentParamsVectorDatabase,
AgentParamsVoice,
Expand All @@ -58,6 +59,8 @@
AgentUpdateParamsIvrNavigationMode,
AgentUpdateParamsLanguage,
AgentUpdateParamsNoiseSuppression,
AgentUpdateParamsOpenaiAccountConnection,
AgentUpdateParamsOpenaiModelNameOverride,
AgentUpdateParamsPrompt,
AgentUpdateParamsVectorDatabase,
AgentUpdateParamsVoice,
Expand Down Expand Up @@ -95,6 +98,7 @@
CreateCallAgentParamsActionsItemOne_ActionTransferCall,
CreateCallAgentParamsEndpointingSensitivity,
CreateCallAgentParamsIvrNavigationMode,
CreateCallAgentParamsOpenaiAccountConnection,
CreateCallAgentParamsPrompt,
CreateCallAgentParamsVectorDatabase,
CreateCallAgentParamsVoice,
Expand Down Expand Up @@ -132,16 +136,20 @@
NormalizedAgent,
NormalizedAgentEndpointingSensitivity,
NormalizedAgentIvrNavigationMode,
NormalizedAgentOpenaiAccountConnection,
NormalizedAgentPrompt,
NormalizedAgentVectorDatabase,
NormalizedCall,
NormalizedCallHumanDetectionResult,
NormalizedCallOnNoHumanAnswer,
NormalizedCallTelephonyAccountConnection,
NormalizedCallTelephonyProvider,
NormalizedPhoneNumber,
NormalizedPhoneNumberTelephonyAccountConnection,
NormalizedPhoneNumberTelephonyProvider,
NormalizedPrompt,
OpenAiAccountConnection,
OpenAiCredentials,
PhoneNumber,
PhoneNumberPage,
PhoneNumberTelephonyProvider,
Expand Down Expand Up @@ -187,6 +195,7 @@
Undefined,
UpdateNumberRequestInboundAgent,
UpdateNumberRequestLabel,
UpdateNumberRequestOutboundOnly,
Usage,
ValidationError,
ValidationErrorLocItem,
Expand Down Expand Up @@ -257,6 +266,7 @@
"AgentParamsActionsItemOne_ActionTransferCall",
"AgentParamsEndpointingSensitivity",
"AgentParamsIvrNavigationMode",
"AgentParamsOpenaiAccountConnection",
"AgentParamsPrompt",
"AgentParamsVectorDatabase",
"AgentParamsVoice",
Expand All @@ -282,6 +292,8 @@
"AgentUpdateParamsIvrNavigationMode",
"AgentUpdateParamsLanguage",
"AgentUpdateParamsNoiseSuppression",
"AgentUpdateParamsOpenaiAccountConnection",
"AgentUpdateParamsOpenaiModelNameOverride",
"AgentUpdateParamsPrompt",
"AgentUpdateParamsVectorDatabase",
"AgentUpdateParamsVoice",
Expand Down Expand Up @@ -319,6 +331,7 @@
"CreateCallAgentParamsActionsItemOne_ActionTransferCall",
"CreateCallAgentParamsEndpointingSensitivity",
"CreateCallAgentParamsIvrNavigationMode",
"CreateCallAgentParamsOpenaiAccountConnection",
"CreateCallAgentParamsPrompt",
"CreateCallAgentParamsVectorDatabase",
"CreateCallAgentParamsVoice",
Expand Down Expand Up @@ -356,16 +369,20 @@
"NormalizedAgent",
"NormalizedAgentEndpointingSensitivity",
"NormalizedAgentIvrNavigationMode",
"NormalizedAgentOpenaiAccountConnection",
"NormalizedAgentPrompt",
"NormalizedAgentVectorDatabase",
"NormalizedCall",
"NormalizedCallHumanDetectionResult",
"NormalizedCallOnNoHumanAnswer",
"NormalizedCallTelephonyAccountConnection",
"NormalizedCallTelephonyProvider",
"NormalizedPhoneNumber",
"NormalizedPhoneNumberTelephonyAccountConnection",
"NormalizedPhoneNumberTelephonyProvider",
"NormalizedPrompt",
"OpenAiAccountConnection",
"OpenAiCredentials",
"PhoneNumber",
"PhoneNumberPage",
"PhoneNumberTelephonyProvider",
Expand Down Expand Up @@ -412,6 +429,7 @@
"UnprocessableEntityError",
"UpdateNumberRequestInboundAgent",
"UpdateNumberRequestLabel",
"UpdateNumberRequestOutboundOnly",
"Usage",
"ValidationError",
"ValidationErrorLocItem",
Expand Down
2 changes: 1 addition & 1 deletion src/vocode/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "vocode-api",
"X-Fern-SDK-Version": "0.0.27",
"X-Fern-SDK-Version": "0.0.28",
}
headers["Authorization"] = f"Bearer {self._get_token()}"
return headers
Expand Down
21 changes: 21 additions & 0 deletions src/vocode/resources/agents/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from ...types.agent_params_actions_item import AgentParamsActionsItem
from ...types.agent_params_endpointing_sensitivity import AgentParamsEndpointingSensitivity
from ...types.agent_params_ivr_navigation_mode import AgentParamsIvrNavigationMode
from ...types.agent_params_openai_account_connection import AgentParamsOpenaiAccountConnection
from ...types.agent_params_prompt import AgentParamsPrompt
from ...types.agent_params_vector_database import AgentParamsVectorDatabase
from ...types.agent_params_voice import AgentParamsVoice
Expand Down Expand Up @@ -96,6 +97,8 @@ def create_agent(
ivr_navigation_mode: typing.Optional[AgentParamsIvrNavigationMode] = OMIT,
conversation_speed: typing.Optional[float] = OMIT,
initial_message_delay: typing.Optional[float] = OMIT,
openai_model_name_override: typing.Optional[str] = OMIT,
openai_account_connection: typing.Optional[AgentParamsOpenaiAccountConnection] = OMIT,
) -> Agent:
"""
Parameters:
Expand Down Expand Up @@ -126,6 +129,10 @@ def create_agent(
- conversation_speed: typing.Optional[float].
- initial_message_delay: typing.Optional[float].
- openai_model_name_override: typing.Optional[str].
- openai_account_connection: typing.Optional[AgentParamsOpenaiAccountConnection].
"""
_request: typing.Dict[str, typing.Any] = {"prompt": prompt, "voice": voice}
if language is not OMIT:
Expand All @@ -152,6 +159,10 @@ def create_agent(
_request["conversation_speed"] = conversation_speed
if initial_message_delay is not OMIT:
_request["initial_message_delay"] = initial_message_delay
if openai_model_name_override is not OMIT:
_request["openai_model_name_override"] = openai_model_name_override
if openai_account_connection is not OMIT:
_request["openai_account_connection"] = openai_account_connection
_response = self._client_wrapper.httpx_client.request(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "v1/agents/create"),
Expand Down Expand Up @@ -262,6 +273,8 @@ async def create_agent(
ivr_navigation_mode: typing.Optional[AgentParamsIvrNavigationMode] = OMIT,
conversation_speed: typing.Optional[float] = OMIT,
initial_message_delay: typing.Optional[float] = OMIT,
openai_model_name_override: typing.Optional[str] = OMIT,
openai_account_connection: typing.Optional[AgentParamsOpenaiAccountConnection] = OMIT,
) -> Agent:
"""
Parameters:
Expand Down Expand Up @@ -292,6 +305,10 @@ async def create_agent(
- conversation_speed: typing.Optional[float].
- initial_message_delay: typing.Optional[float].
- openai_model_name_override: typing.Optional[str].
- openai_account_connection: typing.Optional[AgentParamsOpenaiAccountConnection].
"""
_request: typing.Dict[str, typing.Any] = {"prompt": prompt, "voice": voice}
if language is not OMIT:
Expand All @@ -318,6 +335,10 @@ async def create_agent(
_request["conversation_speed"] = conversation_speed
if initial_message_delay is not OMIT:
_request["initial_message_delay"] = initial_message_delay
if openai_model_name_override is not OMIT:
_request["openai_model_name_override"] = openai_model_name_override
if openai_account_connection is not OMIT:
_request["openai_account_connection"] = openai_account_connection
_response = await self._client_wrapper.httpx_client.request(
"POST",
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "v1/agents/create"),
Expand Down
11 changes: 11 additions & 0 deletions src/vocode/resources/numbers/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from ...types.phone_number_page import PhoneNumberPage
from ...types.update_number_request_inbound_agent import UpdateNumberRequestInboundAgent
from ...types.update_number_request_label import UpdateNumberRequestLabel
from ...types.update_number_request_outbound_only import UpdateNumberRequestOutboundOnly

# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
Expand Down Expand Up @@ -98,18 +99,23 @@ def update_number(
self,
*,
phone_number: str,
outbound_only: typing.Optional[UpdateNumberRequestOutboundOnly] = OMIT,
label: typing.Optional[UpdateNumberRequestLabel] = OMIT,
inbound_agent: typing.Optional[UpdateNumberRequestInboundAgent] = OMIT,
) -> PhoneNumber:
"""
Parameters:
- phone_number: str.
- outbound_only: typing.Optional[UpdateNumberRequestOutboundOnly].
- label: typing.Optional[UpdateNumberRequestLabel].
- inbound_agent: typing.Optional[UpdateNumberRequestInboundAgent].
"""
_request: typing.Dict[str, typing.Any] = {}
if outbound_only is not OMIT:
_request["outbound_only"] = outbound_only
if label is not OMIT:
_request["label"] = label
if inbound_agent is not OMIT:
Expand Down Expand Up @@ -267,18 +273,23 @@ async def update_number(
self,
*,
phone_number: str,
outbound_only: typing.Optional[UpdateNumberRequestOutboundOnly] = OMIT,
label: typing.Optional[UpdateNumberRequestLabel] = OMIT,
inbound_agent: typing.Optional[UpdateNumberRequestInboundAgent] = OMIT,
) -> PhoneNumber:
"""
Parameters:
- phone_number: str.
- outbound_only: typing.Optional[UpdateNumberRequestOutboundOnly].
- label: typing.Optional[UpdateNumberRequestLabel].
- inbound_agent: typing.Optional[UpdateNumberRequestInboundAgent].
"""
_request: typing.Dict[str, typing.Any] = {}
if outbound_only is not OMIT:
_request["outbound_only"] = outbound_only
if label is not OMIT:
_request["label"] = label
if inbound_agent is not OMIT:
Expand Down
18 changes: 18 additions & 0 deletions src/vocode/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
)
from .agent_params_endpointing_sensitivity import AgentParamsEndpointingSensitivity
from .agent_params_ivr_navigation_mode import AgentParamsIvrNavigationMode
from .agent_params_openai_account_connection import AgentParamsOpenaiAccountConnection
from .agent_params_prompt import AgentParamsPrompt
from .agent_params_vector_database import AgentParamsVectorDatabase
from .agent_params_voice import AgentParamsVoice
Expand Down Expand Up @@ -73,6 +74,8 @@
from .agent_update_params_ivr_navigation_mode import AgentUpdateParamsIvrNavigationMode
from .agent_update_params_language import AgentUpdateParamsLanguage
from .agent_update_params_noise_suppression import AgentUpdateParamsNoiseSuppression
from .agent_update_params_openai_account_connection import AgentUpdateParamsOpenaiAccountConnection
from .agent_update_params_openai_model_name_override import AgentUpdateParamsOpenaiModelNameOverride
from .agent_update_params_prompt import AgentUpdateParamsPrompt
from .agent_update_params_vector_database import AgentUpdateParamsVectorDatabase
from .agent_update_params_voice import AgentUpdateParamsVoice
Expand Down Expand Up @@ -116,6 +119,7 @@
)
from .create_call_agent_params_endpointing_sensitivity import CreateCallAgentParamsEndpointingSensitivity
from .create_call_agent_params_ivr_navigation_mode import CreateCallAgentParamsIvrNavigationMode
from .create_call_agent_params_openai_account_connection import CreateCallAgentParamsOpenaiAccountConnection
from .create_call_agent_params_prompt import CreateCallAgentParamsPrompt
from .create_call_agent_params_vector_database import CreateCallAgentParamsVectorDatabase
from .create_call_agent_params_voice import CreateCallAgentParamsVoice
Expand Down Expand Up @@ -157,16 +161,20 @@
from .normalized_agent import NormalizedAgent
from .normalized_agent_endpointing_sensitivity import NormalizedAgentEndpointingSensitivity
from .normalized_agent_ivr_navigation_mode import NormalizedAgentIvrNavigationMode
from .normalized_agent_openai_account_connection import NormalizedAgentOpenaiAccountConnection
from .normalized_agent_prompt import NormalizedAgentPrompt
from .normalized_agent_vector_database import NormalizedAgentVectorDatabase
from .normalized_call import NormalizedCall
from .normalized_call_human_detection_result import NormalizedCallHumanDetectionResult
from .normalized_call_on_no_human_answer import NormalizedCallOnNoHumanAnswer
from .normalized_call_telephony_account_connection import NormalizedCallTelephonyAccountConnection
from .normalized_call_telephony_provider import NormalizedCallTelephonyProvider
from .normalized_phone_number import NormalizedPhoneNumber
from .normalized_phone_number_telephony_account_connection import NormalizedPhoneNumberTelephonyAccountConnection
from .normalized_phone_number_telephony_provider import NormalizedPhoneNumberTelephonyProvider
from .normalized_prompt import NormalizedPrompt
from .open_ai_account_connection import OpenAiAccountConnection
from .open_ai_credentials import OpenAiCredentials
from .phone_number import PhoneNumber
from .phone_number_page import PhoneNumberPage
from .phone_number_telephony_provider import PhoneNumberTelephonyProvider
Expand Down Expand Up @@ -212,6 +220,7 @@
from .undefined import Undefined
from .update_number_request_inbound_agent import UpdateNumberRequestInboundAgent
from .update_number_request_label import UpdateNumberRequestLabel
from .update_number_request_outbound_only import UpdateNumberRequestOutboundOnly
from .usage import Usage
from .validation_error import ValidationError
from .validation_error_loc_item import ValidationErrorLocItem
Expand Down Expand Up @@ -286,6 +295,7 @@
"AgentParamsActionsItemOne_ActionTransferCall",
"AgentParamsEndpointingSensitivity",
"AgentParamsIvrNavigationMode",
"AgentParamsOpenaiAccountConnection",
"AgentParamsPrompt",
"AgentParamsVectorDatabase",
"AgentParamsVoice",
Expand All @@ -311,6 +321,8 @@
"AgentUpdateParamsIvrNavigationMode",
"AgentUpdateParamsLanguage",
"AgentUpdateParamsNoiseSuppression",
"AgentUpdateParamsOpenaiAccountConnection",
"AgentUpdateParamsOpenaiModelNameOverride",
"AgentUpdateParamsPrompt",
"AgentUpdateParamsVectorDatabase",
"AgentUpdateParamsVoice",
Expand Down Expand Up @@ -348,6 +360,7 @@
"CreateCallAgentParamsActionsItemOne_ActionTransferCall",
"CreateCallAgentParamsEndpointingSensitivity",
"CreateCallAgentParamsIvrNavigationMode",
"CreateCallAgentParamsOpenaiAccountConnection",
"CreateCallAgentParamsPrompt",
"CreateCallAgentParamsVectorDatabase",
"CreateCallAgentParamsVoice",
Expand Down Expand Up @@ -385,16 +398,20 @@
"NormalizedAgent",
"NormalizedAgentEndpointingSensitivity",
"NormalizedAgentIvrNavigationMode",
"NormalizedAgentOpenaiAccountConnection",
"NormalizedAgentPrompt",
"NormalizedAgentVectorDatabase",
"NormalizedCall",
"NormalizedCallHumanDetectionResult",
"NormalizedCallOnNoHumanAnswer",
"NormalizedCallTelephonyAccountConnection",
"NormalizedCallTelephonyProvider",
"NormalizedPhoneNumber",
"NormalizedPhoneNumberTelephonyAccountConnection",
"NormalizedPhoneNumberTelephonyProvider",
"NormalizedPrompt",
"OpenAiAccountConnection",
"OpenAiCredentials",
"PhoneNumber",
"PhoneNumberPage",
"PhoneNumberTelephonyProvider",
Expand Down Expand Up @@ -440,6 +457,7 @@
"Undefined",
"UpdateNumberRequestInboundAgent",
"UpdateNumberRequestLabel",
"UpdateNumberRequestOutboundOnly",
"Usage",
"ValidationError",
"ValidationErrorLocItem",
Expand Down
3 changes: 3 additions & 0 deletions src/vocode/types/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .agent_voice import AgentVoice
from .interrupt_sensitivity import InterruptSensitivity
from .language import Language
from .open_ai_account_connection import OpenAiAccountConnection
from .pinecone_vector_database import PineconeVectorDatabase
from .prompt import Prompt
from .webhook import Webhook
Expand All @@ -34,6 +35,8 @@ class Agent(pydantic.BaseModel):
ivr_navigation_mode: typing.Optional[AgentIvrNavigationMode]
conversation_speed: typing.Optional[float]
initial_message_delay: typing.Optional[float]
openai_model_name_override: typing.Optional[str]
openai_account_connection: typing.Optional[OpenAiAccountConnection]

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
Expand Down
7 changes: 7 additions & 0 deletions src/vocode/types/agent_params_openai_account_connection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was auto-generated by Fern from our API Definition.

import typing

from .open_ai_account_connection import OpenAiAccountConnection

AgentParamsOpenaiAccountConnection = typing.Union[OpenAiAccountConnection, str]
Loading

0 comments on commit 123717e

Please sign in to comment.