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

perf: Don't store lang field

Clémence Lesnéc07aeb1b31d6
diff --git a/app/models/call.py b/app/models/call.py
index 1e8a7c9..6d02e07 100644
--- a/app/models/call.py
+++ b/app/models/call.py
@@ -5,7 +5,7 @@ from datetime import UTC, datetime, tzinfo
from typing import Any
from uuid import UUID, uuid4
-from pydantic import BaseModel, Field, ValidationInfo, computed_field, field_validator
+from pydantic import BaseModel, Field, ValidationInfo, field_validator
from app.helpers.config_models.conversation import (
LanguageEntryModel,
@@ -107,7 +107,6 @@ class CallStateModel(CallGetModel, extra="ignore"):
recognition_retry: int = 0
voice_id: str | None = None
- @computed_field
@property
def lang(self) -> LanguageEntryModel: # pyright: ignore
default = self.initiate.lang.default_lang