From 57c7983b37ba8232e538c266f4b7f3b30683fc9a Mon Sep 17 00:00:00 2001 From: Jessica Garson Date: Sun, 6 Apr 2025 21:02:54 -0400 Subject: [PATCH 1/2] Trying to change the author name (#439) Co-authored-by: Jeffrey Rengifo --- ...g_crewai_with_elasticsearch_notebook.ipynb | 539 ++++++++++++++++++ 1 file changed, 539 insertions(+) create mode 100644 supporting-blog-content/using-crewai-with-elasticsearch/using_crewai_with_elasticsearch_notebook.ipynb diff --git a/supporting-blog-content/using-crewai-with-elasticsearch/using_crewai_with_elasticsearch_notebook.ipynb b/supporting-blog-content/using-crewai-with-elasticsearch/using_crewai_with_elasticsearch_notebook.ipynb new file mode 100644 index 00000000..99a1c53d --- /dev/null +++ b/supporting-blog-content/using-crewai-with-elasticsearch/using_crewai_with_elasticsearch_notebook.ipynb @@ -0,0 +1,539 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "LlrEjmtJNpuX" + }, + "source": [ + "# Using CrewAI with Elasticsearch\n", + "\n", + "This notebook demonstrates how to use CrewAI with Elasticsearch. This notebook is based on the article [Using CrewAI with Elasticsearch](https://www.elastic.co/search-labs/blog/using-crewai-with-elasticsearch)." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "GNaAN-GNO5qp" + }, + "source": [ + "## Installing dependencies and importing packages" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "qgclZayCk1Ct", + "outputId": "f25349ea-412a-411c-9677-517f933fa5a4" + }, + "outputs": [], + "source": [ + "# It is suggested to run this script with Python 3.11\n", + "%pip install elasticsearch==8.17 'crewai[tools]'" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "rAesontNXpLu", + "outputId": "a951f429-6aa0-48c0-e7d1-aebab0be9e6c" + }, + "outputs": [], + "source": [ + "import json\n", + "import os\n", + "\n", + "from getpass import getpass\n", + "from elasticsearch import Elasticsearch\n", + "from elasticsearch.helpers import bulk\n", + "\n", + "from crewai import Agent, Crew, Task\n", + "from crewai.tools import tool\n", + "from crewai_tools import SerperDevTool, WebsiteSearchTool" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "NwOmnk99Pfh3" + }, + "source": [ + "## Declaring variables" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 339 + }, + "id": "GVKJKfFpPWuj", + "outputId": "693babf7-0cf0-413d-bfde-4353b3bff938" + }, + "outputs": [], + "source": [ + "os.environ[\"ELASTIC_ENDPOINT\"] = getpass(\"Elastic Enpoint: \")\n", + "os.environ[\"ELASTIC_API_KEY\"] = getpass(\"Elastic Api Key: \")\n", + "os.environ[\"SERPER_API_KEY\"] = getpass(\"Serper API Key: \")\n", + "os.environ[\"OPENAI_API_KEY\"] = getpass(\"OpenAI API Key: \")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "3O2HclcYHEsS" + }, + "source": [ + "## Instance a Elasticsearch client" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "1LWiop8NYiQF" + }, + "outputs": [], + "source": [ + "# Elasticsearch client\n", + "_client = Elasticsearch(\n", + " hosts=os.environ[\"ELASTIC_ENDPOINT\"],\n", + " api_key=os.environ[\"ELASTIC_API_KEY\"],\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "9lvPHaXjPlfu" + }, + "source": [ + "## Creating mappings and inference endpoint" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "jInERNQajoNh", + "outputId": "8b1fb48a-0781-4931-abb1-4d2e8340c647" + }, + "outputs": [], + "source": [ + "try:\n", + " _client.options(\n", + " request_timeout=60, max_retries=3, retry_on_timeout=True\n", + " ).inference.put(\n", + " task_type=\"sparse_embedding\",\n", + " inference_id=\"clothes-inference\",\n", + " body={\n", + " \"service\": \"elasticsearch\",\n", + " \"service_settings\": {\n", + " \"adaptive_allocations\": {\"enabled\": True},\n", + " \"num_threads\": 1,\n", + " \"model_id\": \".elser_model_2\",\n", + " },\n", + " },\n", + " )\n", + "\n", + " print(\"Inference endpoint created successfully.\")\n", + "\n", + "except Exception as e:\n", + " print(\n", + " f\"Error creating inference endpoint: {e.info['error']['root_cause'][0]['reason'] }\"\n", + " )" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "*NOTE: After creating the inference endpoint, it is highly recommended to wait 30 seconds for the model to be ready before sending requests.*" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "tc88YzAYw31e", + "outputId": "d2de37eb-e621-41c4-a1e0-6d14264d303d" + }, + "outputs": [], + "source": [ + "try:\n", + " _client.indices.create(\n", + " index=\"summer-clothes\",\n", + " body={\n", + " \"mappings\": {\n", + " \"properties\": {\n", + " \"title\": {\"type\": \"text\", \"copy_to\": \"semantic_field\"},\n", + " \"description\": {\"type\": \"text\", \"copy_to\": \"semantic_field\"},\n", + " \"price\": {\"type\": \"float\"},\n", + " \"semantic_field\": {\n", + " \"type\": \"semantic_text\",\n", + " \"inference_id\": \"clothes-inference\",\n", + " },\n", + " }\n", + " }\n", + " },\n", + " )\n", + "except Exception as e:\n", + " print(\n", + " f\"Error creating inference endpoint: {e.info['error']['root_cause'][0]['reason'] }\"\n", + " )" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "G1634zNrv1OS" + }, + "source": [ + "# Indexing documents" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "LVr6TR8qlw2M" + }, + "outputs": [], + "source": [ + "documents = [\n", + " {\n", + " \"title\": \"Twist-Detail Crop Top\",\n", + " \"description\": \"Fitted crop top in woven, patterned fabric with linen content. Wide shoulder straps, sweetheart neckline, and gathered side seams for a gently draped effect. Twisted detail at center bust, cut-out section at front, and wide smocking at back. Lined\",\n", + " \"price\": 34.99,\n", + " },\n", + " {\n", + " \"title\": \"Rib-knit Tank Top\",\n", + " \"description\": \"Short, fitted top in a soft rib knit. Extra-narrow shoulder straps and a square neckline.\",\n", + " \"price\": 7.49,\n", + " },\n", + " {\n", + " \"title\": \"Linen-blend Shorts\",\n", + " \"description\": \"Shorts in an airy, woven linen blend. High, ruffle-trimmed waist, narrow drawstring and covered elastic at waistband, and discreet side pockets.\",\n", + " \"price\": 13.99,\n", + " },\n", + " {\n", + " \"title\": \"Twill Cargo Shorts\",\n", + " \"description\": \"Fitted shorts in cotton twill with a V-shaped yoke at front and back. High waist, zip fly with button, and patch front pockets.\",\n", + " \"price\": 20.99,\n", + " },\n", + " {\n", + " \"title\": \"Slim Fit Ribbed Tank Top\",\n", + " \"description\": \"Slim-fit tank top in medium weight, ribbed cotton-blend jersey with a fitted silhouette. Straight-cut hem.\",\n", + " \"price\": 8.49,\n", + " },\n", + " {\n", + " \"title\": \"Relaxed Fit Linen Resort Shirt\",\n", + " \"description\": \"Relaxed-fit shirt in airy linen. Resort collar, buttons without placket, yoke at back, and short sleeves. Straight-cut hem. Fabric made from linen is breathable, looks great when ironed or wrinkled, and softens over time.\",\n", + " \"price\": 17.99,\n", + " },\n", + " {\n", + " \"title\": \"Swim Shorts\",\n", + " \"description\": \"Swim shorts in woven fabric. Drawstring and covered elastic at waistband, side pockets, and a back pocket with hook-loop fastener. Small slit at sides. Mesh liner shorts.\",\n", + " \"price\": 14.99,\n", + " },\n", + " {\n", + " \"title\": \"Baggy Fit Cargo Shorts\",\n", + " \"description\": \"Baggy-fit cargo shorts in cotton canvas with a generous but not oversized silhouette. Zip fly with button, diagonal side pockets, back pockets with flap and snap fasteners, and bellows leg pockets with snap fasteners.\",\n", + " \"price\": 20.99,\n", + " },\n", + " {\n", + " \"title\": \"Muslin Shorts\",\n", + " \"description\": \"Shorts in airy cotton muslin. High, ruffle-trimmed waist, covered elastic at waistband, and an extra-narrow drawstring with a bead at ends. Discreet side pockets.\",\n", + " \"price\": 15.99,\n", + " },\n", + " {\n", + " \"title\": \"Oversized Lyocell-blend Dress\",\n", + " \"description\": \"Short, oversized dress in a woven lyocell blend. Gathered, low-cut V-neck with extra-narrow ties at front, 3/4-length, raglan-cut balloon sleeves with narrow elastic at cuffs, and seams at waist and hips with delicate piping. Unlined.\",\n", + " \"price\": 38.99,\n", + " },\n", + "]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "N6cI3toLl3DP", + "outputId": "e6de913a-0b4d-480e-a736-ac3afda2b568" + }, + "outputs": [], + "source": [ + "def build_data():\n", + " for doc in documents:\n", + " yield {\"_index\": \"summer-clothes\", \"_source\": doc}\n", + "\n", + "\n", + "try:\n", + " success, errors = bulk(_client, build_data())\n", + " print(f\"{success} documents indexed successfully\")\n", + " if errors:\n", + " print(\"Errors during indexing:\", errors)\n", + "\n", + "except Exception as e:\n", + " print(f\"Error: {str(e)}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "SxI_L3Kev5Tk" + }, + "source": [ + "# Creating CrewAI custom tool" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "eI_Mi-J3oFwr" + }, + "outputs": [], + "source": [ + "@tool(\"Elasticsearch custom tool\")\n", + "def elasticsearch_tool(question: str) -> str:\n", + " \"\"\"\n", + " Search in Elasticsearch using semantic search capabilities.\n", + "\n", + " Args:\n", + " question (str): The search query to be semantically matched\n", + "\n", + " Returns:\n", + " str: Concatenated hits from Elasticsearch as string JSON\n", + " \"\"\"\n", + "\n", + " response = _client.search(\n", + " index=\"summer-clothes\",\n", + " body={\n", + " \"size\": 10,\n", + " \"_source\": {\"includes\": [\"description\", \"title\", \"price\"]},\n", + " \"retriever\": {\n", + " \"rrf\": {\n", + " \"retrievers\": [\n", + " {\"standard\": {\"query\": {\"match\": {\"title\": question}}}},\n", + " {\n", + " \"standard\": {\n", + " \"query\": {\n", + " \"semantic\": {\n", + " \"field\": \"semantic_field\",\n", + " \"query\": question,\n", + " }\n", + " }\n", + " }\n", + " },\n", + " ]\n", + " }\n", + " },\n", + " },\n", + " )\n", + "\n", + " hits = response[\"hits\"][\"hits\"]\n", + "\n", + " if not hits:\n", + " return \"\"\n", + "\n", + " result = json.dumps([hit[\"_source\"] for hit in hits], indent=2)\n", + "\n", + " return result" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "9boWureEn12E" + }, + "outputs": [], + "source": [ + "search_tool = SerperDevTool()\n", + "web_rag_tool = WebsiteSearchTool()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "X_0NBD1xv87q" + }, + "source": [ + "# Setup Agents and Tasks" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "KP8H1t-gqpDL" + }, + "outputs": [], + "source": [ + "es_retriever_agent = Agent(\n", + " role=\"Retriever\",\n", + " goal=\"Retrieve Elasticsearch documents\",\n", + " backstory=\"You are an expert researcher\",\n", + " tools=[elasticsearch_tool],\n", + " verbose=True,\n", + ")\n", + "\n", + "\n", + "internet_researcher_agent = Agent(\n", + " role=\"Research analyst\",\n", + " goal=\"Provide up-to-date market analysis of the industry\",\n", + " backstory=\"You are an expert analyst\",\n", + " tools=[search_tool, web_rag_tool],\n", + " verbose=True,\n", + ")\n", + "\n", + "\n", + "writer_agent = Agent(\n", + " role=\"Content Writer\",\n", + " goal=\"Craft engaging blog posts about the information gathered\",\n", + " backstory=\"A skilled writer with a passion for writing about fashion\",\n", + " tools=[],\n", + " verbose=True,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "5j88PRahqrwM" + }, + "outputs": [], + "source": [ + "es_retriever_task = Task(\n", + " description=\"Retrieve documents from the Elasticsearch index.\",\n", + " expected_output=\"A list of documents retrieved from the Elasticsearch index based on the query.\",\n", + " agent=es_retriever_agent,\n", + ")\n", + "\n", + "\n", + "internet_research_task = Task(\n", + " description=\"Research the latest trends in the summer clothes industry and provide a summary.\",\n", + " expected_output=\"A summary of the top 5 trending clothes for summer with a unique perspective on their significance.\",\n", + " agent=internet_researcher_agent,\n", + ")\n", + "\n", + "write_task = Task(\n", + " description=\"Compare and contrast the information provided from the Retriever agent and the research agent, use cites. Be short\",\n", + " expected_output=\"Short report about Elasticsearch retriever and researcher.\",\n", + " agent=writer_agent,\n", + " output_file=\"blog-posts/new_post.md\", # The final blog post will be saved here\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "bfOm8wdvwF7N" + }, + "source": [ + "# Executing task" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "LXqw4o62qyFN", + "outputId": "549a6001-beaf-47ad-d430-ef57813c6a6b" + }, + "outputs": [], + "source": [ + "# Use in a crew\n", + "crew = Crew(\n", + " agents=[es_retriever_agent, internet_researcher_agent, writer_agent],\n", + " tasks=[\n", + " es_retriever_task,\n", + " internet_research_task,\n", + " write_task,\n", + " ],\n", + ")\n", + "\n", + "# Execute tasks\n", + "crew.kickoff()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "S6WZMJayyzxh" + }, + "source": [ + "## Deleting\n", + "\n", + "Delete the resources used to prevent them from consuming resources." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "9UcQwa41yy_x", + "outputId": "8c8337e1-8685-4c33-ae51-ee61e323f0cd" + }, + "outputs": [], + "source": [ + "# Cleanup - Delete Index\n", + "_client.indices.delete(index=\"summer-clothes\", ignore=[400, 404])\n", + "\n", + "# Cleanup - Inference endpoint\n", + "_client.inference.delete(inference_id=\"clothes-inference\", ignore=[400, 404])" + ] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "3.11.11", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} From e1f8b125ea62aa50335f22c7044efd2aadd32709 Mon Sep 17 00:00:00 2001 From: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com> Date: Mon, 7 Apr 2025 11:54:36 +0800 Subject: [PATCH 2/2] chatbot-rag-app: updates to EDOT which unpins instrumentation-openai version (#429) Signed-off-by: Adrian Cole --- example-apps/chatbot-rag-app/README.md | 1 + .../chatbot-rag-app/api/llm_integrations.py | 3 +- example-apps/chatbot-rag-app/requirements.txt | 156 +++++++++--------- 3 files changed, 83 insertions(+), 77 deletions(-) diff --git a/example-apps/chatbot-rag-app/README.md b/example-apps/chatbot-rag-app/README.md index 2e326b64..2f0872f4 100644 --- a/example-apps/chatbot-rag-app/README.md +++ b/example-apps/chatbot-rag-app/README.md @@ -220,6 +220,7 @@ reinstall like this. Once checked in, any commands above will use updates. rm -rf .venv requirements.txt python3 -m venv .venv source .venv/bin/activate +pip install --upgrade pip # Install dev requirements for pip-compile and edot-bootstrap pip install pip-tools elastic-opentelemetry # Recreate requirements.txt diff --git a/example-apps/chatbot-rag-app/api/llm_integrations.py b/example-apps/chatbot-rag-app/api/llm_integrations.py index 68146eef..8c356a6d 100644 --- a/example-apps/chatbot-rag-app/api/llm_integrations.py +++ b/example-apps/chatbot-rag-app/api/llm_integrations.py @@ -20,7 +20,8 @@ def init_openai_chat(temperature): def init_vertex_chat(temperature): - # VertexAI is not yet in EDOT. Use the Langtrace Python SDK instead + # opentelemetry-instrumentation-vertexai is included by EDOT, but does not + # yet not support streaming. Use the Langtrace Python SDK instead. from langtrace_python_sdk.instrumentation import VertexAIInstrumentation VertexAIInstrumentation().instrument() diff --git a/example-apps/chatbot-rag-app/requirements.txt b/example-apps/chatbot-rag-app/requirements.txt index 775ee7de..3acfe21d 100644 --- a/example-apps/chatbot-rag-app/requirements.txt +++ b/example-apps/chatbot-rag-app/requirements.txt @@ -6,7 +6,7 @@ # aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.11.14 +aiohttp==3.11.16 # via langchain-community aiosignal==1.3.2 # via aiohttp @@ -20,11 +20,11 @@ attrs==25.3.0 # via aiohttp blinker==1.9.0 # via flask -boto3==1.37.13 +boto3==1.37.28 # via # langchain-aws # langtrace-python-sdk -botocore==1.37.13 +botocore==1.37.28 # via # boto3 # s3transfer @@ -41,7 +41,7 @@ charset-normalizer==3.4.1 # via requests click==8.1.8 # via flask -cohere==5.14.0 +cohere==5.14.2 # via langchain-cohere colorama==0.4.6 # via @@ -60,7 +60,7 @@ distro==1.9.0 # via openai docstring-parser==0.16 # via google-cloud-aiplatform -elastic-opentelemetry==0.8.0 +elastic-opentelemetry==1.0.0 # via -r requirements.in elastic-transport==8.17.1 # via elasticsearch @@ -84,7 +84,7 @@ frozenlist==1.5.0 # via # aiohttp # aiosignal -fsspec==2025.3.0 +fsspec==2025.3.2 # via # huggingface-hub # langtrace-python-sdk @@ -103,9 +103,9 @@ google-auth==2.38.0 # google-cloud-core # google-cloud-resource-manager # google-cloud-storage -google-cloud-aiplatform==1.84.0 +google-cloud-aiplatform==1.87.0 # via langchain-google-vertexai -google-cloud-bigquery==3.30.0 +google-cloud-bigquery==3.31.0 # via google-cloud-aiplatform google-cloud-core==2.4.3 # via @@ -117,7 +117,7 @@ google-cloud-storage==2.19.0 # via # google-cloud-aiplatform # langchain-google-vertexai -google-crc32c==1.6.0 +google-crc32c==1.7.1 # via # google-cloud-storage # google-resumable-media @@ -132,8 +132,6 @@ googleapis-common-protos[grpc]==1.69.2 # grpcio-status # opentelemetry-exporter-otlp-proto-grpc # opentelemetry-exporter-otlp-proto-http -greenlet==3.1.1 - # via sqlalchemy grpc-google-iam-v1==0.14.2 # via google-cloud-resource-manager grpcio==1.71.0 @@ -164,7 +162,7 @@ httpx-sse==0.4.0 # langchain-community # langchain-google-vertexai # langchain-mistralai -huggingface-hub==0.29.3 +huggingface-hub==0.30.1 # via # tokenizers # transformers @@ -190,17 +188,17 @@ jsonpatch==1.33 # via langchain-core jsonpointer==3.0.0 # via jsonpatch -langchain==0.3.20 +langchain==0.3.23 # via # -r requirements.in # langchain-community -langchain-aws==0.2.15 +langchain-aws==0.2.18 # via -r requirements.in langchain-cohere==0.4.3 # via -r requirements.in -langchain-community==0.3.19 +langchain-community==0.3.21 # via langchain-cohere -langchain-core==0.3.45 +langchain-core==0.3.51 # via # langchain # langchain-aws @@ -213,20 +211,20 @@ langchain-core==0.3.45 # langchain-text-splitters langchain-elasticsearch==0.3.2 # via -r requirements.in -langchain-google-vertexai==2.0.15 +langchain-google-vertexai==2.0.19 # via -r requirements.in -langchain-mistralai==0.2.8 +langchain-mistralai==0.2.10 # via -r requirements.in -langchain-openai==0.3.8 +langchain-openai==0.3.12 # via -r requirements.in -langchain-text-splitters==0.3.6 +langchain-text-splitters==0.3.8 # via langchain -langsmith==0.3.15 +langsmith==0.3.24 # via # langchain # langchain-community # langchain-core -langtrace-python-sdk==3.8.6 +langtrace-python-sdk==3.8.11 # via -r requirements.in log-symbols==0.0.14 # via halo @@ -236,7 +234,7 @@ markupsafe==3.0.2 # werkzeug marshmallow==3.26.1 # via dataclasses-json -multidict==6.1.0 +multidict==6.3.2 # via # aiohttp # yarl @@ -249,9 +247,9 @@ numpy==2.2.4 # langchain-community # shapely # transformers -openai==1.66.3 +openai==1.70.0 # via langchain-openai -opentelemetry-api==1.31.0 +opentelemetry-api==1.31.1 # via # elastic-opentelemetry # langtrace-python-sdk @@ -263,31 +261,31 @@ opentelemetry-api==1.31.0 # opentelemetry-resourcedetector-gcp # opentelemetry-sdk # opentelemetry-semantic-conventions -opentelemetry-exporter-otlp==1.31.0 +opentelemetry-exporter-otlp==1.31.1 # via elastic-opentelemetry -opentelemetry-exporter-otlp-proto-common==1.31.0 +opentelemetry-exporter-otlp-proto-common==1.31.1 # via # opentelemetry-exporter-otlp-proto-grpc # opentelemetry-exporter-otlp-proto-http -opentelemetry-exporter-otlp-proto-grpc==1.31.0 +opentelemetry-exporter-otlp-proto-grpc==1.31.1 # via # langtrace-python-sdk # opentelemetry-exporter-otlp -opentelemetry-exporter-otlp-proto-http==1.31.0 +opentelemetry-exporter-otlp-proto-http==1.31.1 # via # langtrace-python-sdk # opentelemetry-exporter-otlp -opentelemetry-instrumentation==0.52b0 +opentelemetry-instrumentation==0.52b1 # via # elastic-opentelemetry # langtrace-python-sdk # opentelemetry-instrumentation-sqlalchemy # opentelemetry-instrumentation-system-metrics -opentelemetry-instrumentation-sqlalchemy==0.52b0 +opentelemetry-instrumentation-sqlalchemy==0.52b1 # via langtrace-python-sdk -opentelemetry-instrumentation-system-metrics==0.52b0 +opentelemetry-instrumentation-system-metrics==0.52b1 # via elastic-opentelemetry -opentelemetry-proto==1.31.0 +opentelemetry-proto==1.31.1 # via # opentelemetry-exporter-otlp-proto-common # opentelemetry-exporter-otlp-proto-grpc @@ -296,7 +294,7 @@ opentelemetry-resource-detector-azure==0.1.5 # via elastic-opentelemetry opentelemetry-resourcedetector-gcp==1.8.0a0 # via elastic-opentelemetry -opentelemetry-sdk==1.31.0 +opentelemetry-sdk==1.31.1 # via # elastic-opentelemetry # langtrace-python-sdk @@ -307,13 +305,13 @@ opentelemetry-sdk==1.31.0 # opentelemetry-sdk-extension-aws opentelemetry-sdk-extension-aws==2.1.0 # via elastic-opentelemetry -opentelemetry-semantic-conventions==0.52b0 +opentelemetry-semantic-conventions==0.52b1 # via # elastic-opentelemetry # opentelemetry-instrumentation # opentelemetry-instrumentation-sqlalchemy # opentelemetry-sdk -orjson==3.10.15 +orjson==3.10.16 # via langsmith packaging==24.2 # via @@ -327,7 +325,7 @@ packaging==24.2 # opentelemetry-instrumentation # opentelemetry-instrumentation-sqlalchemy # transformers -propcache==0.3.0 +propcache==0.3.1 # via # aiohttp # yarl @@ -336,7 +334,7 @@ proto-plus==1.26.1 # google-api-core # google-cloud-aiplatform # google-cloud-resource-manager -protobuf==5.29.3 +protobuf==5.29.4 # via # google-api-core # google-cloud-aiplatform @@ -352,9 +350,9 @@ pyasn1==0.6.1 # via # pyasn1-modules # rsa -pyasn1-modules==0.4.1 +pyasn1-modules==0.4.2 # via google-auth -pydantic==2.10.6 +pydantic==2.11.2 # via # cohere # google-cloud-aiplatform @@ -368,7 +366,7 @@ pydantic==2.10.6 # openai # pydantic-settings # trace-attributes -pydantic-core==2.27.2 +pydantic-core==2.33.1 # via # cohere # pydantic @@ -378,7 +376,7 @@ python-dateutil==2.9.0.post0 # via # botocore # google-cloud-bigquery -python-dotenv==1.0.1 +python-dotenv==1.1.0 # via pydantic-settings pyyaml==6.0.2 # via @@ -414,9 +412,9 @@ s3transfer==0.11.4 # via boto3 safetensors==0.5.3 # via transformers -sentry-sdk==2.23.1 +sentry-sdk==2.25.1 # via langtrace-python-sdk -shapely==2.0.7 +shapely==2.1.0 # via google-cloud-aiplatform simsimd==6.2.1 # via elasticsearch @@ -430,16 +428,16 @@ sniffio==1.3.1 # openai spinners==0.0.24 # via halo -sqlalchemy==2.0.39 +sqlalchemy==2.0.40 # via # langchain # langchain-community # langtrace-python-sdk -tenacity==9.0.0 +tenacity==9.1.2 # via # langchain-community # langchain-core -termcolor==2.5.0 +termcolor==3.0.1 # via halo tiktoken==0.9.0 # via @@ -456,15 +454,15 @@ tqdm==4.67.1 # huggingface-hub # openai # transformers -trace-attributes==7.2.0 +trace-attributes==7.2.1 # via langtrace-python-sdk -transformers==4.49.0 +transformers==4.51.0 # via langtrace-python-sdk -types-pyyaml==6.0.12.20241230 +types-pyyaml==6.0.12.20250402 # via langchain-cohere -types-requests==2.32.0.20250306 +types-requests==2.32.0.20250328 # via cohere -typing-extensions==4.12.2 +typing-extensions==4.13.1 # via # anyio # cohere @@ -478,8 +476,11 @@ typing-extensions==4.12.2 # pydantic-core # sqlalchemy # typing-inspect + # typing-inspection typing-inspect==0.9.0 # via dataclasses-json +typing-inspection==0.4.0 + # via pydantic ujson==5.10.0 # via langtrace-python-sdk urllib3==2.3.0 @@ -489,6 +490,8 @@ urllib3==2.3.0 # requests # sentry-sdk # types-requests +validators==0.34.0 + # via langchain-google-vertexai werkzeug==3.1.3 # via # flask @@ -498,7 +501,7 @@ wrapt==1.17.2 # deprecated # opentelemetry-instrumentation # opentelemetry-instrumentation-sqlalchemy -yarl==1.18.3 +yarl==1.19.0 # via aiohttp zipp==3.21.0 # via importlib-metadata @@ -507,26 +510,27 @@ zstandard==0.23.0 # The following packages are considered to be unsafe in a requirements file: # setuptools -opentelemetry-instrumentation-asyncio==0.52b0 -opentelemetry-instrumentation-dbapi==0.52b0 -opentelemetry-instrumentation-logging==0.52b0 -opentelemetry-instrumentation-sqlite3==0.52b0 -opentelemetry-instrumentation-threading==0.52b0 -opentelemetry-instrumentation-urllib==0.52b0 -opentelemetry-instrumentation-wsgi==0.52b0 -opentelemetry-instrumentation-aiohttp-client==0.52b0 -opentelemetry-instrumentation-aiohttp-server==0.52b0 -opentelemetry-instrumentation-boto3sqs==0.52b0 -opentelemetry-instrumentation-botocore==0.52b0 -opentelemetry-instrumentation-click==0.52b0 -opentelemetry-instrumentation-elasticsearch==0.52b0 -opentelemetry-instrumentation-flask==0.52b0 -opentelemetry-instrumentation-grpc==0.52b0 -opentelemetry-instrumentation-httpx==0.52b0 -opentelemetry-instrumentation-jinja2==0.52b0 -opentelemetry-instrumentation-requests==0.52b0 -opentelemetry-instrumentation-sqlalchemy==0.52b0 -opentelemetry-instrumentation-system-metrics==0.52b0 -opentelemetry-instrumentation-tortoiseorm==0.52b0 -opentelemetry-instrumentation-urllib3==0.52b0 -elastic-opentelemetry-instrumentation-openai==0.6.1 +opentelemetry-instrumentation-asyncio==0.52b1 +opentelemetry-instrumentation-dbapi==0.52b1 +opentelemetry-instrumentation-logging==0.52b1 +opentelemetry-instrumentation-sqlite3==0.52b1 +opentelemetry-instrumentation-threading==0.52b1 +opentelemetry-instrumentation-urllib==0.52b1 +opentelemetry-instrumentation-wsgi==0.52b1 +opentelemetry-instrumentation-vertexai>=2.0b0 +opentelemetry-instrumentation-aiohttp-client==0.52b1 +opentelemetry-instrumentation-aiohttp-server==0.52b1 +opentelemetry-instrumentation-boto3sqs==0.52b1 +opentelemetry-instrumentation-botocore==0.52b1 +opentelemetry-instrumentation-click==0.52b1 +opentelemetry-instrumentation-elasticsearch==0.52b1 +opentelemetry-instrumentation-flask==0.52b1 +opentelemetry-instrumentation-grpc==0.52b1 +opentelemetry-instrumentation-httpx==0.52b1 +opentelemetry-instrumentation-jinja2==0.52b1 +opentelemetry-instrumentation-requests==0.52b1 +opentelemetry-instrumentation-sqlalchemy==0.52b1 +opentelemetry-instrumentation-system-metrics==0.52b1 +opentelemetry-instrumentation-tortoiseorm==0.52b1 +opentelemetry-instrumentation-urllib3==0.52b1 +elastic-opentelemetry-instrumentation-openai