Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
security: Upgrade deps
Clémence Lesné9c3908170fa7
diff --git a/requirements-dev.txt b/requirements-dev.txtindex dc20b0d..5ac4432 100644--- a/requirements-dev.txt+++ b/requirements-dev.txt@@ -1,9 +1,9 @@black[jupyter]==24.4.2deepeval==0.21.59deptry==0.16.1-pur==7.3.1+pur==7.3.2pytest-assume==2.4.3pytest-asyncio==0.23.7 # Required for pytestpytest-repeat==0.9.3 # Required for pytestpytest-xdist[psutil]==3.6.1 # Required for pytest-pytest==8.2.1+pytest==8.2.2diff --git a/requirements.txt b/requirements.txtindex 062a98c..54acd84 100644--- a/requirements.txt+++ b/requirements.txt@@ -5,32 +5,32 @@ azure-ai-translation-text==1.0.0azure-communication-callautomation==1.2.0azure-communication-sms==1.0.1azure-cosmos==4.7.0-azure-eventgrid==4.19.0-azure-functions==1.19.0-azure-identity==1.16.0 # Required for all Azure SDKs-azure-monitor-opentelemetry==1.4.2+azure-eventgrid==4.20.0+azure-functions==1.20.0+azure-identity==1.17.0 # Required for all Azure SDKs+azure-monitor-opentelemetry==1.6.0azure-search-documents==11.6.0b4azure-storage-queue==12.10.0django-htmlmin==0.11.0jinja2==3.1.4-json-repair==0.20.1+json-repair==0.25.1mistune==3.0.2-openai==1.35.2+openai==1.35.3opentelemetry-instrumentation-aiohttp-client==0.46b0opentelemetry-instrumentation-httpx==0.46b0-opentelemetry-instrumentation-openai==0.21.4+opentelemetry-instrumentation-openai==0.23.0opentelemetry-instrumentation-redis==0.46b0opentelemetry-instrumentation-sqlite3==0.46b0opentelemetry-semantic-conventions==0.46b0-phonenumbers==8.13.37 # Required for pydantic-extra-types-pydantic-extra-types==2.7.0 # Required for pydantic-pydantic-settings==2.2.1+phonenumbers==8.13.39 # Required for pydantic-extra-types+pydantic-extra-types==2.8.2 # Required for pydantic+pydantic-settings==2.3.3pydantic[email]==2.7.4python-dotenv==1.0.1pytz==2024.1pyyaml==6.0.1-redis==5.0.4+redis==5.0.6tenacity==8.2.3tiktoken==0.7.0-twilio==9.1.0-typing-extensions==4.12.0+twilio==9.2.1+typing-extensions==4.12.2diff --git a/tests/conftest.py b/tests/conftest.pyindex 89f9f84..dcdeb59 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -165,8 +165,18 @@ class DeepEvalAzureOpenAI(GPTModel):self._cache = cacheself._model = AzureChatOpenAI(**_langchain_kwargs)- def generate(self, *args, **kwargs):- raise NotImplementedError+ def generate(self, prompt: str) -> Tuple[str, float]:+ prompt = dedent(prompt).strip()+ cache_key = self._cache_key(prompt)+ # Try cache+ content: Tuple[str, float] = self._cache.get(cache_key, None)+ if content:+ return content+ # Try live+ res = super().generate(prompt)+ # Update cache+ self._cache.set(cache_key, res)+ return resasync def a_generate(self, prompt: str) -> Tuple[str, float]:prompt = dedent(prompt).strip()diff --git a/tests/llm.py b/tests/llm.pyindex a026087..ad9678f 100644--- a/tests/llm.py+++ b/tests/llm.py@@ -42,6 +42,7 @@ class ClaimRelevancyMetric(BaseMetric):model: GPTModel,threshold: float = 0.5,):+ super().__init__()self.call = callself.model = modelself.threshold = threshold@@ -203,7 +204,8 @@ class ClaimRelevancyMetric(BaseMetric):return {extract["key"]: extract["value"]for extract in extracts- if extract["value"]+ if "value" in extract+ and "key" in extractand any(claim_field.name == extract["key"]for claim_field in self.call.initiate.claim