Merge branch 'cognify_adjusment_crewai_demo' of github.com:topoteretes/cognee into cognify_adjusment_crewai_demo

This commit is contained in:
Igor Ilic 2025-06-04 16:37:21 +02:00
commit 911bba9a30
6 changed files with 24 additions and 6 deletions

View file

@ -82,6 +82,7 @@ export default function CrewAITrigger({ onData, onActivity }: CrewAITriggerProps
.then(response => response.json())
.then(() => {
onActivity([{ id: uuid4(), timestamp: Date.now(), activity: "Hiring crew agents made a decision" }]);
onData(null);
})
.catch(() => {
onActivity([{ id: uuid4(), timestamp: Date.now(), activity: "Hiring crew agents had problems while executing" }]);

View file

@ -87,7 +87,7 @@ export default function GraphControls({ isAddNodeFormOpen, onGraphShapeChange, o
setTimeout(() => {
onFitIntoView();
}, 500);
});
}, [onFitIntoView, onGraphShapeChange]);
return (
<>

View file

@ -35,6 +35,12 @@ export default function GraphView() {
const [data, updateData] = useState<GraphData>();
const onDataChange = useCallback((newData: NodesAndEdges) => {
if (newData === null) {
// Requests for resetting the data
updateData(undefined);
return;
}
if (!newData.nodes.length && !newData.links.length) {
return;
}

View file

@ -2,9 +2,10 @@ import colors from "tailwindcss/colors";
import { formatHex } from "culori";
const NODE_COLORS = {
Document: formatHex(colors.blue[500]),
Chunk: formatHex(colors.green[500]),
Entity: formatHex(colors.yellow[500]),
TextDocument: formatHex(colors.blue[500]),
DocumentChunk: formatHex(colors.green[500]),
TextSummary: formatHex(colors.orange[500]),
Entity: formatHex(colors.yellow[300]),
EntityType: formatHex(colors.purple[800]),
NodeSet: formatHex(colors.indigo[300]),
GitHubUser: formatHex(colors.gray[300]),

View file

@ -25,7 +25,6 @@ class HiringCrew:
def __init__(self, user, inputs):
self.user = user
self.inputs = inputs
self
@agent
def soft_skills_expert_agent(self) -> Agent:

View file

@ -1,4 +1,5 @@
import os
import random
import time
import warnings
from uuid import uuid4
@ -20,8 +21,18 @@ def print_environment():
print(f"{key}={os.environ[key]}")
github_tokens = [
os.getenv("GITHUB_TOKEN"),
os.getenv("GITHUB_TOKEN_FALLBACK_1"),
os.getenv("GITHUB_TOKEN_FALLBACK_2"),
os.getenv("GITHUB_TOKEN_FALLBACK_3"),
os.getenv("GITHUB_TOKEN_FALLBACK_4"),
os.getenv("GITHUB_TOKEN_FALLBACK_5"),
]
async def run_github_ingestion(user, dataset, applicant_1, applicant_2):
token = os.getenv("GITHUB_TOKEN")
token = random.choice(github_tokens)
pipeline_run_id = get_crewai_pipeline_run_id(user.id)