Skip to content

Commit

Permalink
Release 0.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Aug 26, 2023
1 parent 220ad53 commit 8b93d4c
Show file tree
Hide file tree
Showing 20 changed files with 238 additions and 10 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.15"
version = "0.0.16"
description = ""
readme = "README.md"
authors = []
Expand Down
22 changes: 22 additions & 0 deletions src/vocode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
AgentParamsActionsItemOne_ActionDtmf,
AgentParamsActionsItemOne_ActionEndConversation,
AgentParamsActionsItemOne_ActionTransferCall,
AgentParamsPrompt,
AgentParamsVectorDatabase,
AgentParamsVoice,
AgentParamsVoiceOne,
Expand Down Expand Up @@ -71,12 +72,15 @@
Call,
CallPage,
CallStatus,
CollectField,
CollectFieldFieldType,
CreateCallAgentParams,
CreateCallAgentParamsActionsItem,
CreateCallAgentParamsActionsItemOne,
CreateCallAgentParamsActionsItemOne_ActionDtmf,
CreateCallAgentParamsActionsItemOne_ActionEndConversation,
CreateCallAgentParamsActionsItemOne_ActionTransferCall,
CreateCallAgentParamsPrompt,
CreateCallAgentParamsVectorDatabase,
CreateCallAgentParamsVoice,
CreateCallAgentParamsVoiceOne,
Expand Down Expand Up @@ -108,6 +112,7 @@
InterruptSensitivity,
Language,
NormalizedAgent,
NormalizedAgentPrompt,
NormalizedAgentVectorDatabase,
NormalizedCall,
NormalizedPhoneNumber,
Expand All @@ -126,6 +131,12 @@
PlayHtVoiceUpdateParamsApiKey,
PlayHtVoiceUpdateParamsApiUserId,
PlayHtVoiceUpdateParamsVoiceId,
Prompt,
PromptParams,
PromptUpdateParams,
PromptUpdateParamsCollectFields,
PromptUpdateParamsContent,
PromptUpdateParamsContextEndpoint,
RimeVoice,
RimeVoiceParams,
RimeVoiceUpdateParams,
Expand Down Expand Up @@ -203,6 +214,7 @@
"AgentParamsActionsItemOne_ActionDtmf",
"AgentParamsActionsItemOne_ActionEndConversation",
"AgentParamsActionsItemOne_ActionTransferCall",
"AgentParamsPrompt",
"AgentParamsVectorDatabase",
"AgentParamsVoice",
"AgentParamsVoiceOne",
Expand Down Expand Up @@ -245,12 +257,15 @@
"Call",
"CallPage",
"CallStatus",
"CollectField",
"CollectFieldFieldType",
"CreateCallAgentParams",
"CreateCallAgentParamsActionsItem",
"CreateCallAgentParamsActionsItemOne",
"CreateCallAgentParamsActionsItemOne_ActionDtmf",
"CreateCallAgentParamsActionsItemOne_ActionEndConversation",
"CreateCallAgentParamsActionsItemOne_ActionTransferCall",
"CreateCallAgentParamsPrompt",
"CreateCallAgentParamsVectorDatabase",
"CreateCallAgentParamsVoice",
"CreateCallAgentParamsVoiceOne",
Expand Down Expand Up @@ -282,6 +297,7 @@
"InterruptSensitivity",
"Language",
"NormalizedAgent",
"NormalizedAgentPrompt",
"NormalizedAgentVectorDatabase",
"NormalizedCall",
"NormalizedPhoneNumber",
Expand All @@ -300,6 +316,12 @@
"PlayHtVoiceUpdateParamsApiKey",
"PlayHtVoiceUpdateParamsApiUserId",
"PlayHtVoiceUpdateParamsVoiceId",
"Prompt",
"PromptParams",
"PromptUpdateParams",
"PromptUpdateParamsCollectFields",
"PromptUpdateParamsContent",
"PromptUpdateParamsContextEndpoint",
"RimeVoice",
"RimeVoiceParams",
"RimeVoiceUpdateParams",
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.15",
"X-Fern-SDK-Version": "0.0.16",
}
headers["Authorization"] = f"Bearer {self._get_token()}"
return headers
Expand Down
9 changes: 5 additions & 4 deletions src/vocode/resources/agents/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from ...types.agent import Agent
from ...types.agent_page import AgentPage
from ...types.agent_params_actions_item import AgentParamsActionsItem
from ...types.agent_params_prompt import AgentParamsPrompt
from ...types.agent_params_vector_database import AgentParamsVectorDatabase
from ...types.agent_params_voice import AgentParamsVoice
from ...types.agent_params_webhook import AgentParamsWebhook
Expand Down Expand Up @@ -79,7 +80,7 @@ def list_agents(self, *, page: typing.Optional[int] = None, size: typing.Optiona
def create_agent(
self,
*,
prompt: str,
prompt: AgentParamsPrompt,
language: typing.Optional[Language] = OMIT,
actions: typing.Optional[typing.List[AgentParamsActionsItem]] = OMIT,
voice: AgentParamsVoice,
Expand All @@ -91,7 +92,7 @@ def create_agent(
) -> Agent:
"""
Parameters:
- prompt: str.
- prompt: AgentParamsPrompt.
- language: typing.Optional[Language].
Expand Down Expand Up @@ -220,7 +221,7 @@ async def list_agents(self, *, page: typing.Optional[int] = None, size: typing.O
async def create_agent(
self,
*,
prompt: str,
prompt: AgentParamsPrompt,
language: typing.Optional[Language] = OMIT,
actions: typing.Optional[typing.List[AgentParamsActionsItem]] = OMIT,
voice: AgentParamsVoice,
Expand All @@ -232,7 +233,7 @@ async def create_agent(
) -> Agent:
"""
Parameters:
- prompt: str.
- prompt: AgentParamsPrompt.
- language: typing.Optional[Language].
Expand Down
22 changes: 22 additions & 0 deletions src/vocode/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
AgentParamsActionsItemOne_ActionEndConversation,
AgentParamsActionsItemOne_ActionTransferCall,
)
from .agent_params_prompt import AgentParamsPrompt
from .agent_params_vector_database import AgentParamsVectorDatabase
from .agent_params_voice import AgentParamsVoice
from .agent_params_voice_one import (
Expand Down Expand Up @@ -90,6 +91,8 @@
from .call import Call
from .call_page import CallPage
from .call_status import CallStatus
from .collect_field import CollectField
from .collect_field_field_type import CollectFieldFieldType
from .create_call_agent_params import CreateCallAgentParams
from .create_call_agent_params_actions_item import CreateCallAgentParamsActionsItem
from .create_call_agent_params_actions_item_one import (
Expand All @@ -98,6 +101,7 @@
CreateCallAgentParamsActionsItemOne_ActionEndConversation,
CreateCallAgentParamsActionsItemOne_ActionTransferCall,
)
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
from .create_call_agent_params_voice_one import (
Expand Down Expand Up @@ -131,6 +135,7 @@
from .interrupt_sensitivity import InterruptSensitivity
from .language import Language
from .normalized_agent import NormalizedAgent
from .normalized_agent_prompt import NormalizedAgentPrompt
from .normalized_agent_vector_database import NormalizedAgentVectorDatabase
from .normalized_call import NormalizedCall
from .normalized_phone_number import NormalizedPhoneNumber
Expand All @@ -149,6 +154,12 @@
from .play_ht_voice_update_params_api_key import PlayHtVoiceUpdateParamsApiKey
from .play_ht_voice_update_params_api_user_id import PlayHtVoiceUpdateParamsApiUserId
from .play_ht_voice_update_params_voice_id import PlayHtVoiceUpdateParamsVoiceId
from .prompt import Prompt
from .prompt_params import PromptParams
from .prompt_update_params import PromptUpdateParams
from .prompt_update_params_collect_fields import PromptUpdateParamsCollectFields
from .prompt_update_params_content import PromptUpdateParamsContent
from .prompt_update_params_context_endpoint import PromptUpdateParamsContextEndpoint
from .rime_voice import RimeVoice
from .rime_voice_params import RimeVoiceParams
from .rime_voice_update_params import RimeVoiceUpdateParams
Expand Down Expand Up @@ -230,6 +241,7 @@
"AgentParamsActionsItemOne_ActionDtmf",
"AgentParamsActionsItemOne_ActionEndConversation",
"AgentParamsActionsItemOne_ActionTransferCall",
"AgentParamsPrompt",
"AgentParamsVectorDatabase",
"AgentParamsVoice",
"AgentParamsVoiceOne",
Expand Down Expand Up @@ -272,12 +284,15 @@
"Call",
"CallPage",
"CallStatus",
"CollectField",
"CollectFieldFieldType",
"CreateCallAgentParams",
"CreateCallAgentParamsActionsItem",
"CreateCallAgentParamsActionsItemOne",
"CreateCallAgentParamsActionsItemOne_ActionDtmf",
"CreateCallAgentParamsActionsItemOne_ActionEndConversation",
"CreateCallAgentParamsActionsItemOne_ActionTransferCall",
"CreateCallAgentParamsPrompt",
"CreateCallAgentParamsVectorDatabase",
"CreateCallAgentParamsVoice",
"CreateCallAgentParamsVoiceOne",
Expand Down Expand Up @@ -309,6 +324,7 @@
"InterruptSensitivity",
"Language",
"NormalizedAgent",
"NormalizedAgentPrompt",
"NormalizedAgentVectorDatabase",
"NormalizedCall",
"NormalizedPhoneNumber",
Expand All @@ -327,6 +343,12 @@
"PlayHtVoiceUpdateParamsApiKey",
"PlayHtVoiceUpdateParamsApiUserId",
"PlayHtVoiceUpdateParamsVoiceId",
"Prompt",
"PromptParams",
"PromptUpdateParams",
"PromptUpdateParamsCollectFields",
"PromptUpdateParamsContent",
"PromptUpdateParamsContextEndpoint",
"RimeVoice",
"RimeVoiceParams",
"RimeVoiceUpdateParams",
Expand Down
3 changes: 2 additions & 1 deletion src/vocode/types/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
from .interrupt_sensitivity import InterruptSensitivity
from .language import Language
from .pinecone_vector_database import PineconeVectorDatabase
from .prompt import Prompt
from .webhook import Webhook


class Agent(pydantic.BaseModel):
id: str
user_id: str
prompt: str
prompt: Prompt
language: typing.Optional[Language]
actions: typing.List[AgentActionsItem]
voice: AgentVoice
Expand Down
7 changes: 7 additions & 0 deletions src/vocode/types/agent_params_prompt.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 .prompt_params import PromptParams

AgentParamsPrompt = typing.Union[str, PromptParams]
3 changes: 2 additions & 1 deletion src/vocode/types/agent_update_params_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import typing

from .prompt_update_params import PromptUpdateParams
from .undefined import Undefined

AgentUpdateParamsPrompt = typing.Union[str, Undefined]
AgentUpdateParamsPrompt = typing.Union[str, PromptUpdateParams, Undefined]
29 changes: 29 additions & 0 deletions src/vocode/types/collect_field.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

import pydantic

from ..core.datetime_utils import serialize_datetime
from .collect_field_field_type import CollectFieldFieldType


class CollectField(pydantic.BaseModel):
field_type: CollectFieldFieldType
label: str
name: str
description: typing.Optional[str]

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().dict(**kwargs_with_defaults)

class Config:
frozen = True
smart_union = True
json_encoders = {dt.datetime: serialize_datetime}
19 changes: 19 additions & 0 deletions src/vocode/types/collect_field_field_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class CollectFieldFieldType(str, enum.Enum):
FIELD_TYPE_EMAIL = "field_type_email"
FIELD_TYPE_ADDRESS = "field_type_address"

def visit(
self, field_type_email: typing.Callable[[], T_Result], field_type_address: typing.Callable[[], T_Result]
) -> T_Result:
if self is CollectFieldFieldType.FIELD_TYPE_EMAIL:
return field_type_email()
if self is CollectFieldFieldType.FIELD_TYPE_ADDRESS:
return field_type_address()
3 changes: 2 additions & 1 deletion src/vocode/types/create_call_agent_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from ..core.datetime_utils import serialize_datetime
from .create_call_agent_params_actions_item import CreateCallAgentParamsActionsItem
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
from .create_call_agent_params_webhook import CreateCallAgentParamsWebhook
Expand All @@ -15,7 +16,7 @@


class CreateCallAgentParams(pydantic.BaseModel):
prompt: str
prompt: CreateCallAgentParamsPrompt
language: typing.Optional[Language]
actions: typing.Optional[typing.List[CreateCallAgentParamsActionsItem]]
voice: typing.Optional[CreateCallAgentParamsVoice]
Expand Down
7 changes: 7 additions & 0 deletions src/vocode/types/create_call_agent_params_prompt.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 .prompt_params import PromptParams

CreateCallAgentParamsPrompt = typing.Union[str, PromptParams]
3 changes: 2 additions & 1 deletion src/vocode/types/normalized_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
from ..core.datetime_utils import serialize_datetime
from .interrupt_sensitivity import InterruptSensitivity
from .language import Language
from .normalized_agent_prompt import NormalizedAgentPrompt
from .normalized_agent_vector_database import NormalizedAgentVectorDatabase


class NormalizedAgent(pydantic.BaseModel):
id: str
user_id: str
prompt: str
prompt: NormalizedAgentPrompt
language: typing.Optional[Language]
actions: typing.List[str]
voice: str
Expand Down
7 changes: 7 additions & 0 deletions src/vocode/types/normalized_agent_prompt.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 .prompt_params import PromptParams

NormalizedAgentPrompt = typing.Union[str, PromptParams]
Loading

0 comments on commit 8b93d4c

Please sign in to comment.