这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a7096dc
WIP agent support
timothycarambat Apr 4, 2024
d1cf887
move agent folder
timothycarambat Apr 4, 2024
ad3df8f
Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into a…
timothycarambat Apr 8, 2024
7543df5
wip frontend socket
timothycarambat Apr 9, 2024
8e78fa9
checkpoint
timothycarambat Apr 10, 2024
befba43
fix schema
timothycarambat Apr 10, 2024
1532521
Checkpoint for plugins and AgentHandler
timothycarambat Apr 11, 2024
9c2f5ed
refactor plugins and agent arch
timothycarambat Apr 11, 2024
bad766b
agent error reporting and handling
timothycarambat Apr 11, 2024
b133302
add frontend elements for agents in prompt input
timothycarambat Apr 11, 2024
b3b80ac
WIP integrations for agents
timothycarambat Apr 12, 2024
f54a4e6
Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into a…
timothycarambat Apr 12, 2024
3172860
enable web-search agent config from frontend
timothycarambat Apr 12, 2024
b83cc35
persist chat history
timothycarambat Apr 12, 2024
4958c41
update alert
timothycarambat Apr 12, 2024
24d2ed5
update migration
timothycarambat Apr 12, 2024
ed7b8bb
add examples to dockerignore
timothycarambat Apr 12, 2024
0559f0f
update close method
timothycarambat Apr 12, 2024
ace8cbd
wrap scraping rejections
timothycarambat Apr 12, 2024
acffa85
add RAG search as funciton
timothycarambat Apr 12, 2024
90dfa02
Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into a…
timothycarambat Apr 12, 2024
5c650e9
Add telem and link highlight
timothycarambat Apr 12, 2024
4c7103d
chat support
timothycarambat Apr 13, 2024
40a77a2
patch memory
timothycarambat Apr 13, 2024
db70b47
Add rechart as a plugin option
timothycarambat Apr 15, 2024
0b49c04
Toggles for abilites of default agent (system wide)
timothycarambat Apr 15, 2024
cea3552
add UI for toggle of configs for agent
timothycarambat Apr 15, 2024
3ca2420
toggle WS or WSS protocol
timothycarambat Apr 15, 2024
99c4482
update NGNIX proxy pass
timothycarambat Apr 15, 2024
b3eaeab
move components around and capture failed websocket creation
timothycarambat Apr 15, 2024
b64b51d
fix name
timothycarambat Apr 15, 2024
f87c3af
tmp docker image
timothycarambat Apr 15, 2024
578d04b
reset workflow
timothycarambat Apr 15, 2024
ead47bd
safety mark functions
timothycarambat Apr 15, 2024
4ae37e8
telem on tool calls
timothycarambat Apr 15, 2024
3b6b143
remove hardcode short circuit
timothycarambat Apr 15, 2024
23f4dc7
merge with agent-support and add ability toggle
timothycarambat Apr 15, 2024
f0f639d
separate web-browser from scrape
timothycarambat Apr 16, 2024
2966555
extract summarizer to util
timothycarambat Apr 16, 2024
bc62ed3
langchain summarize verbose when in dev
timothycarambat Apr 16, 2024
b210a62
merge with agent-support
timothycarambat Apr 16, 2024
a9f86f6
merge with master
timothycarambat Apr 16, 2024
34f6939
chart styling improvements + add title to chart
shatfield4 Apr 16, 2024
f41484c
Merge branch 'master' into agent-support-charts
shatfield4 Apr 16, 2024
c0e7451
fix legend from being cutoff in chart downloads
shatfield4 Apr 17, 2024
0d18be8
sync to master
timothycarambat Apr 26, 2024
b032b80
remove cursor blink
timothycarambat Apr 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"aibitat",
"anythingllm",
"Astra",
"Chartable",
"comkey",
"cooldown",
"cooldowns",
"Deduplicator",
"Dockerized",
"Embeddable",
Expand Down
3 changes: 3 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@metamask/jazzicon": "^2.0.0",
"@microsoft/fetch-event-source": "^2.0.1",
"@phosphor-icons/react": "^2.0.13",
"@tremor/react": "^3.15.1",
"dompurify": "^3.0.8",
"file-saver": "^2.0.5",
"he": "^1.2.0",
Expand All @@ -30,6 +31,8 @@
"react-tag-input-component": "^2.0.2",
"react-toastify": "^9.1.3",
"react-tooltip": "^5.25.2",
"recharts": "^2.12.5",
"recharts-to-png": "^2.3.1",
"text-case": "^1.0.9",
"truncate": "^3.0.0",
"uuid": "^9.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
export default function CustomCell({ ...props }) {
const {
root,
depth,
x,
y,
width,
height,
index,
payload,
colors,
rank,
name,
} = props;
return (
<g>
<rect
x={x}
y={y}
width={width}
height={height}
style={{
fill:
depth < 2
? colors[Math.floor((index / root.children.length) * 6)]
: "#ffffff00",
stroke: "#fff",
strokeWidth: 2 / (depth + 1e-10),
strokeOpacity: 1 / (depth + 1e-10),
}}
/>
{depth === 1 ? (
<text
x={x + width / 2}
y={y + height / 2 + 7}
textAnchor="middle"
fill="#fff"
fontSize={14}
>
{name}
</text>
) : null}
{depth === 1 ? (
<text x={x + 4} y={y + 18} fill="#fff" fontSize={16} fillOpacity={0.9}>
{index + 1}
</text>
) : null}
</g>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import { Tooltip as RechartsTooltip } from "recharts";

// Given a hex, convert to the opposite highest-contrast color
// and if `bw` is enabled, force it to be black/white to normalize
// interface.
function invertColor(hex, bw) {
if (hex.indexOf("#") === 0) {
hex = hex.slice(1);
}
// convert 3-digit hex to 6-digits.
if (hex.length === 3) {
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
}
if (hex.length !== 6) {
throw new Error("Invalid HEX color.");
}
var r = parseInt(hex.slice(0, 2), 16),
g = parseInt(hex.slice(2, 4), 16),
b = parseInt(hex.slice(4, 6), 16);
if (bw) {
// https://stackoverflow.com/a/3943023/112731
return r * 0.299 + g * 0.587 + b * 0.114 > 186 ? "#FFFFFF" : "#000000";
// : '#FFFFFF';
}
// invert color components
r = (255 - r).toString(16);
g = (255 - g).toString(16);
b = (255 - b).toString(16);
// pad each with zeros and return
return "#" + padZero(r) + padZero(g) + padZero(b);
}

function padZero(str, len) {
len = len || 2;
var zeros = new Array(len).join("0");
return (zeros + str).slice(-len);
}

export default function Tooltip({ legendColor, ...props }) {
return (
<RechartsTooltip
wrapperStyle={{ outline: "none" }}
isAnimationActive={false}
cursor={{ fill: "#d1d5db", opacity: "0.15" }}
position={{ y: 0 }}
{...props}
content={({ active, payload, label }) => {
return active && payload ? (
<div className="bg-white text-sm rounded-md border shadow-lg">
<div className="border-b py-2 px-4">
<p className="text-elem text-gray-700 font-medium">{label}</p>
</div>
<div className="space-y-1 py-2 px-4">
{payload.map(({ value, name }, idx) => (
<div
key={`id-${idx}`}
className="flex items-center justify-between space-x-8"
>
<div className="flex items-center space-x-2">
<span
className="shrink-0 h-3 w-3 border-white rounded-md rounded-full border-2 shadow-md"
style={{ backgroundColor: legendColor }}
/>
<p
style={{
color: invertColor(legendColor, true),
}}
className="font-medium tabular-nums text-right whitespace-nowrap"
>
{value}
</p>
</div>
<p
style={{
color: invertColor(legendColor, true),
}}
className="whitespace-nowrap font-normal"
>
{name}
</p>
</div>
))}
</div>
</div>
) : null;
}}
/>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
export const Colors = {
blue: "#3b82f6",
sky: "#0ea5e9",
cyan: "#06b6d4",
teal: "#14b8a6",
emerald: "#10b981",
green: "#22c55e",
lime: "#84cc16",
yellow: "#eab308",
amber: "#f59e0b",
orange: "#f97316",
red: "#ef4444",
rose: "#f43f5e",
pink: "#ec4899",
fuchsia: "#d946ef",
purple: "#a855f7",
violet: "#8b5cf6",
indigo: "#6366f1",
neutral: "#737373",
stone: "#78716c",
gray: "#6b7280",
slate: "#64748b",
zinc: "#71717a",
};

export function getTremorColor(color) {
switch (color) {
case "blue":
return Colors.blue;
case "sky":
return Colors.sky;
case "cyan":
return Colors.cyan;
case "teal":
return Colors.teal;
case "emerald":
return Colors.emerald;
case "green":
return Colors.green;
case "lime":
return Colors.lime;
case "yellow":
return Colors.yellow;
case "amber":
return Colors.amber;
case "orange":
return Colors.orange;
case "red":
return Colors.red;
case "rose":
return Colors.rose;
case "pink":
return Colors.pink;
case "fuchsia":
return Colors.fuchsia;
case "purple":
return Colors.purple;
case "violet":
return Colors.violet;
case "indigo":
return Colors.indigo;
case "neutral":
return Colors.neutral;
case "stone":
return Colors.stone;
case "gray":
return Colors.gray;
case "slate":
return Colors.slate;
case "zinc":
return Colors.zinc;
}
}

export const themeColorRange = [
"slate",
"gray",
"zinc",
"neutral",
"stone",
"red",
"orange",
"amber",
"yellow",
"lime",
"green",
"emerald",
"teal",
"cyan",
"sky",
"blue",
"indigo",
"violet",
"purple",
"fuchsia",
"pink",
"rose",
];
Loading