Skip to content

Commit 2dd1827

Browse files
authored
[On-Prem] Extend on prem agent config (#701)
* Add kb, fix types * Fix types
1 parent d0ff0bd commit 2dd1827

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/elevenlabs/conversational_ai/conversation.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import json
77
import logging
88
import threading
9-
from typing import Any, Awaitable, Callable, Dict, Literal, Optional, Tuple, Union
9+
from typing import Any, Awaitable, Callable, Dict, List, Literal, Optional, Tuple, Union
1010
import urllib.parse
1111

1212
import websockets
@@ -322,15 +322,17 @@ def __init__(
322322
post_call_transcription_webhook_url: Optional[str] = None,
323323
post_call_audio_webhook_url: Optional[str] = None,
324324
agent_config_dict: Optional[dict] = None,
325-
override_agent_config_list: Optional[dict] = None,
326-
tools_config_list: Optional[dict] = None,
325+
override_agent_config_list: Optional[List[dict]] = None,
326+
tools_config_list: Optional[List[dict]] = None,
327+
prompt_knowledge_base: Optional[List[str]] = None,
327328
):
328329
self.on_prem_conversation_url = on_prem_conversation_url
329330
self.post_call_transcription_webhook_url = post_call_transcription_webhook_url
330331
self.post_call_audio_webhook_url = post_call_audio_webhook_url
331-
self.agent_config_dict = agent_config_dict or {}
332-
self.override_agent_config_list = override_agent_config_list or {}
333-
self.tools_config_list = tools_config_list or {}
332+
self.agent_config_dict = agent_config_dict
333+
self.override_agent_config_list = override_agent_config_list
334+
self.tools_config_list = tools_config_list
335+
self.prompt_knowledge_base = prompt_knowledge_base
334336

335337
class BaseConversation:
336338
"""Base class for conversation implementations with shared parameters and logic."""
@@ -386,6 +388,7 @@ def _create_on_prem_initiation_message(self):
386388
"tools_config_list": self.on_prem_config.tools_config_list,
387389
"post_call_transcription_webhook_url": self.on_prem_config.post_call_transcription_webhook_url,
388390
"post_call_audio_webhook_url": self.on_prem_config.post_call_audio_webhook_url,
391+
"prompt_knowledge_base": self.on_prem_config.prompt_knowledge_base,
389392
}
390393
)
391394

0 commit comments

Comments
 (0)