Add OPENAI_API_KEY as required by QdrantSearchTool (#461)

This commit is contained in:
Thiago Moretto
2025-09-24 13:34:37 -03:00
committed by GitHub
parent 7c2aa2f923
commit 2a927933f2

View File

@@ -15,7 +15,7 @@ except ImportError:
FieldCondition = Any
MatchValue = Any
from crewai.tools import BaseTool
from crewai.tools import BaseTool, EnvVar
from pydantic import BaseModel, Field
@@ -75,6 +75,9 @@ class QdrantVectorSearchTool(BaseTool):
description="A custom embedding function to use for vectorization. If not provided, the default model will be used.",
)
package_dependencies: List[str] = ["qdrant-client"]
env_vars: List[EnvVar] = [
EnvVar(name="OPENAI_API_KEY", description="API key for OpenAI", required=True)
]
def __init__(self, **kwargs):
super().__init__(**kwargs)