mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
Add OPENAI_API_KEY as required by QdrantSearchTool (#461)
This commit is contained in:
@@ -15,7 +15,7 @@ except ImportError:
|
|||||||
FieldCondition = Any
|
FieldCondition = Any
|
||||||
MatchValue = Any
|
MatchValue = Any
|
||||||
|
|
||||||
from crewai.tools import BaseTool
|
from crewai.tools import BaseTool, EnvVar
|
||||||
from pydantic import BaseModel, Field
|
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.",
|
description="A custom embedding function to use for vectorization. If not provided, the default model will be used.",
|
||||||
)
|
)
|
||||||
package_dependencies: List[str] = ["qdrant-client"]
|
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):
|
def __init__(self, **kwargs):
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user