This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # uv pip install crewai crewai-tools pydantic==2.9.2 langchain-core langgraph openai-agents | |
| import json | |
| from typing import List | |
| from crewai_tools import SerperDevTool | |
| from langchain_openai import ChatOpenAI | |
| from pydantic import BaseModel | |
| from crewai.agents.agent_adapters.langgraph.langgraph_adapter import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from crewai.utilities.events import ( | |
| TaskCompletedEvent, | |
| ) | |
| from crewai.utilities.events.base_event_listener import BaseEventListener | |
| from crewai.task import Task | |
| from crewai.utilities.evaluators.task_evaluator import TaskEvaluator | |
| from crewai.utilities.events.crewai_event_bus import CrewAIEventsBus | |
| from opik.evaluation.metrics import Hallucination | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Any, Dict, List, Optional, Union | |
| from qdrant_client import QdrantClient | |
| from crewai.knowledge.storage.knowledge_storage import KnowledgeStorage | |
| class QdrantStorage(KnowledgeStorage): | |
| """ | |
| Extends Storage to handle embeddings for memory entries using Qdrant. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from crewai_tools import RagTool | |
| from dotenv import load_dotenv | |
| from crewai import Agent, Crew, Process, Task | |
| load_dotenv() | |
| rag_tool = RagTool( | |
| config={ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env osascript -l JavaScript | |
| const chrome = Application("Google Chrome"); | |
| const window = chrome.Window().make(); | |
| function run(input) { | |
| const url = input[0][0]; | |
| let tab = chrome.Tab({url}); | |
| if(url.startsWith("https")){ | |
| return chrome.windows[0].tabs[0].url = url; | |
| }{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tell application "Shortcuts" to run shortcut "MorningAutomationDNDToggler" | |
| tell application "Calendar" to activate | |
| tell application "zoom.us" to launch | |
| tell application "Spotify" to launch | |
| if application "Spotify" is running then | |
| tell application "Spotify" | |
| play track "spotify:track:7eTxWRSvauWm5L3FblGk2h" | |
| end tell | |
| end if | |
| tell application "Google Chrome" to activate (open location "https://hashnode.com/") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Build = () => { | |
| const router = useRouter(); | |
| const { session } = useContext(UserContext); | |
| useEffect(() => { | |
| if (!session) { | |
| router.push("/signin"); | |
| } | |
| }, [session]); | |
| return ( |