import { Document, BaseNode } from "../Node";
import { v4 as uuidv4 } from "uuid";
import { BaseRetriever } from "../Retriever";
import { ServiceContext } from "../ServiceContext";
import { StorageContext } from "../storage/StorageContext";
This file contains 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
# !/bin/bash | |
# Remove old docker images only after 2 runs to allow for rollbacks. | |
# Docker images also need to finish processing their requests before they can be removed. | |
docker pull sweepai/sweep:$TAG | |
containers_to_remove=$(docker ps -q --filter "ancestor=sweepai/sweep" | awk 'NR>2') | |
if [ ! -z "$containers_to_remove" ]; then |
This file contains 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
#!/bin/bash | |
# Function to safely remove a directory and echo the action | |
safe_remove() { | |
local dir="$1" | |
if [ -d "$dir" ]; then | |
echo "Removing: $dir" | |
rm -rf "$dir" | |
fi | |
} |
This file contains 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
#!/bin/bash | |
CYAN='\033[0;46m' | |
WHITE='\033[1;37m' | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color | |
echo -e "\n${CYAN}${WHITE}### Starting Setup Script ###${NC}\n" | |
# Function to display message and exit when a command fails |
import { Document, BaseNode } from "../Node";
import { v4 as uuidv4 } from "uuid";
import { BaseRetriever } from "../Retriever";
import { ServiceContext } from "../ServiceContext";
import { StorageContext } from "../storage/StorageContext";