[UP] v 0.1.4-2

This commit is contained in:
Evgeny (Krymmy) Momotov 2025-11-13 18:07:40 +03:00
parent c329602dd7
commit a52092e8ec
2 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,6 @@
[project]
name = "callerapimanager"
version = "0.1.4-1"
version = "0.1.4-2"
description = ""
authors = [
{name = "Evgeny (Krymmy) Momotov",email = "evgeny.momotov@gmail.com"}

View file

@ -73,8 +73,10 @@ class CallerManagerClient:
response = await self._request('PATCH', f'/calls/{call_id}', json=call.model_dump(exclude_unset=True))
return Call(**response)
async def get_call_dialog(self, call_id: int) -> CallDialog:
async def get_call_dialog(self, call_id: int) -> Optional[CallDialog]:
response = await self._request('GET', f'/calls/{call_id}/dialog')
if not response:
return None
return CallDialog(**response)
async def create_call_dialog(self, dialog: CallDialogIn) -> CallDialog:
@ -97,12 +99,16 @@ class CallerManagerClient:
response = await self._request('GET', f'/prompts/{prompt_id}')
return CallPrompt(**response)
async def get_prompt_yandex_settings(self, prompt_id: int) -> YandexSpeechKit:
async def get_prompt_yandex_settings(self, prompt_id: int) -> Optional[YandexSpeechKit]:
response = await self._request('GET', f'/prompts/{prompt_id}/yandex_settings')
if not response:
return
return YandexSpeechKit(**response)
async def get_prompt_openai_settings(self, prompt_id: int) -> OpenAISettings:
async def get_prompt_openai_settings(self, prompt_id: int) -> Optional[OpenAISettings]:
response = await self._request('GET', f'/prompts/{prompt_id}/openai_settings')
if not response:
return
return OpenAISettings(**response)
async def get_yandex_fleet_driver_profile(self, driver_id: int) -> DriverProfile: