Update crewai_agent.py
Browse files- crewai_agent.py +5 -1
crewai_agent.py
CHANGED
|
@@ -14,7 +14,10 @@ from langchain.prompts import PromptTemplate
|
|
| 14 |
from langchain.chains import LLMChain
|
| 15 |
|
| 16 |
# Load environment variables
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
@tool
|
| 20 |
def calculator_tool(operation: str, a: float, b: float) -> str:
|
|
@@ -124,6 +127,7 @@ class LangChainAgent:
|
|
| 124 |
model="gemini-2.0-flash",
|
| 125 |
temperature=0,
|
| 126 |
max_tokens=2048
|
|
|
|
| 127 |
)
|
| 128 |
elif provider == "huggingface":
|
| 129 |
return ChatHuggingFace(
|
|
|
|
| 14 |
from langchain.chains import LLMChain
|
| 15 |
|
| 16 |
# Load environment variables
|
| 17 |
+
GOOGLE_API_KEY = os.getenv('GOOGLE_API_KEY')
|
| 18 |
+
HUGGINGFACE_API_TOKEN= os.getenv('HUGGINGFACE_API_TOKEN')
|
| 19 |
+
TAVILY_API_KEY = os.getenv('TAVILY_API_KEY')
|
| 20 |
+
|
| 21 |
|
| 22 |
@tool
|
| 23 |
def calculator_tool(operation: str, a: float, b: float) -> str:
|
|
|
|
| 127 |
model="gemini-2.0-flash",
|
| 128 |
temperature=0,
|
| 129 |
max_tokens=2048
|
| 130 |
+
|
| 131 |
)
|
| 132 |
elif provider == "huggingface":
|
| 133 |
return ChatHuggingFace(
|