Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

fix: Sentences cut LLM stream

Clémence Lesnéd30027d72098
diff --git a/main.py b/main.py
index 0d18efe..8e7f8a7 100644
--- a/main.py
+++ b/main.py
@@ -111,7 +111,7 @@ api = FastAPI(
CALL_EVENT_URL = f'{CONFIG.api.events_domain.strip("/")}/call/event'
CALL_INBOUND_URL = f'{CONFIG.api.events_domain.strip("/")}/call/inbound'
-SENTENCE_R = r"[^\w\s\-/',:;()]"
+SENTENCE_R = r"[^\w\s+\-/'\",:;()]"
MESSAGE_ACTION_R = rf"(?:{'|'.join([action.value for action in MessageAction])}):"
FUNC_NAME_SANITIZER_R = r"[^a-zA-Z0-9_-]"