Merge branch 'cognify_adjusment_crewai_demo' of github.com:topoteretes/cognee into cognify_adjusment_crewai_demo
This commit is contained in:
commit
911bba9a30
6 changed files with 24 additions and 6 deletions
|
|
@ -82,6 +82,7 @@ export default function CrewAITrigger({ onData, onActivity }: CrewAITriggerProps
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(() => {
|
.then(() => {
|
||||||
onActivity([{ id: uuid4(), timestamp: Date.now(), activity: "Hiring crew agents made a decision" }]);
|
onActivity([{ id: uuid4(), timestamp: Date.now(), activity: "Hiring crew agents made a decision" }]);
|
||||||
|
onData(null);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
onActivity([{ id: uuid4(), timestamp: Date.now(), activity: "Hiring crew agents had problems while executing" }]);
|
onActivity([{ id: uuid4(), timestamp: Date.now(), activity: "Hiring crew agents had problems while executing" }]);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ export default function GraphControls({ isAddNodeFormOpen, onGraphShapeChange, o
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
onFitIntoView();
|
onFitIntoView();
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
}, [onFitIntoView, onGraphShapeChange]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,12 @@ export default function GraphView() {
|
||||||
const [data, updateData] = useState<GraphData>();
|
const [data, updateData] = useState<GraphData>();
|
||||||
|
|
||||||
const onDataChange = useCallback((newData: NodesAndEdges) => {
|
const onDataChange = useCallback((newData: NodesAndEdges) => {
|
||||||
|
if (newData === null) {
|
||||||
|
// Requests for resetting the data
|
||||||
|
updateData(undefined);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!newData.nodes.length && !newData.links.length) {
|
if (!newData.nodes.length && !newData.links.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,10 @@ import colors from "tailwindcss/colors";
|
||||||
import { formatHex } from "culori";
|
import { formatHex } from "culori";
|
||||||
|
|
||||||
const NODE_COLORS = {
|
const NODE_COLORS = {
|
||||||
Document: formatHex(colors.blue[500]),
|
TextDocument: formatHex(colors.blue[500]),
|
||||||
Chunk: formatHex(colors.green[500]),
|
DocumentChunk: formatHex(colors.green[500]),
|
||||||
Entity: formatHex(colors.yellow[500]),
|
TextSummary: formatHex(colors.orange[500]),
|
||||||
|
Entity: formatHex(colors.yellow[300]),
|
||||||
EntityType: formatHex(colors.purple[800]),
|
EntityType: formatHex(colors.purple[800]),
|
||||||
NodeSet: formatHex(colors.indigo[300]),
|
NodeSet: formatHex(colors.indigo[300]),
|
||||||
GitHubUser: formatHex(colors.gray[300]),
|
GitHubUser: formatHex(colors.gray[300]),
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ class HiringCrew:
|
||||||
def __init__(self, user, inputs):
|
def __init__(self, user, inputs):
|
||||||
self.user = user
|
self.user = user
|
||||||
self.inputs = inputs
|
self.inputs = inputs
|
||||||
self
|
|
||||||
|
|
||||||
@agent
|
@agent
|
||||||
def soft_skills_expert_agent(self) -> Agent:
|
def soft_skills_expert_agent(self) -> Agent:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
import random
|
||||||
import time
|
import time
|
||||||
import warnings
|
import warnings
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
@ -20,8 +21,18 @@ def print_environment():
|
||||||
print(f"{key}={os.environ[key]}")
|
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):
|
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)
|
pipeline_run_id = get_crewai_pipeline_run_id(user.id)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue