mirror of
https://github.com/Significant-Gravitas/Auto-GPT.git
synced 2025-01-08 11:57:32 +08:00
Merge branch 'master' of github.com:Significant-Gravitas/AutoGPT into zamilmajdy/random-test-on-ci
This commit is contained in:
commit
0b4f435b32
@ -48,7 +48,7 @@
|
||||
"dotenv": "^16.4.5",
|
||||
"lucide-react": "^0.407.0",
|
||||
"moment": "^2.30.1",
|
||||
"next": "14.2.4",
|
||||
"next": "^14.2.13",
|
||||
"next-themes": "^0.3.0",
|
||||
"react": "^18",
|
||||
"react-day-picker": "^8.10.1",
|
||||
|
@ -6,7 +6,7 @@ export async function GET(request: Request) {
|
||||
const { searchParams, origin } = new URL(request.url);
|
||||
const code = searchParams.get("code");
|
||||
// if "next" is in param, use it as the redirect URL
|
||||
const next = searchParams.get("next") ?? "/profile";
|
||||
const next = searchParams.get("next") ?? "/";
|
||||
|
||||
if (code) {
|
||||
const supabase = createServerClient();
|
||||
|
@ -8,7 +8,7 @@ export default function Home() {
|
||||
|
||||
return (
|
||||
<FlowEditor
|
||||
className="flow-container w-full min-h-[86vh] border border-gray-300 dark:border-gray-700 rounded-lg"
|
||||
className="flow-container"
|
||||
flowID={query.get("flowID") ?? query.get("templateID") ?? undefined}
|
||||
template={!!query.get("templateID")}
|
||||
/>
|
||||
|
@ -34,7 +34,7 @@ export default function RootLayout({
|
||||
>
|
||||
<div className="flex min-h-screen flex-col">
|
||||
<NavBar />
|
||||
<main className="flex-1 overflow-hidden p-4">{children}</main>
|
||||
<main className="flex-1 p-4">{children}</main>
|
||||
<TallyPopupSimple />
|
||||
</div>
|
||||
<Toaster />
|
||||
|
@ -30,7 +30,7 @@ export async function login(values: z.infer<typeof loginFormSchema>) {
|
||||
}
|
||||
|
||||
revalidatePath("/", "layout");
|
||||
redirect("/profile");
|
||||
redirect("/");
|
||||
});
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ export async function signup(values: z.infer<typeof loginFormSchema>) {
|
||||
}
|
||||
|
||||
revalidatePath("/", "layout");
|
||||
redirect("/profile");
|
||||
redirect("/");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -48,8 +48,8 @@ export default function LoginPage() {
|
||||
});
|
||||
|
||||
if (user) {
|
||||
console.log("User exists, redirecting to profile");
|
||||
router.push("/profile");
|
||||
console.log("User exists, redirecting to home");
|
||||
router.push("/");
|
||||
}
|
||||
|
||||
if (isUserLoading || isSupabaseLoading || user) {
|
||||
|
@ -585,7 +585,7 @@ export function CustomNode({ data, id, width, height }: NodeProps<CustomNode>) {
|
||||
{blockCost && (
|
||||
<div className="p-3 font-semibold">
|
||||
<span className="ml-auto flex items-center">
|
||||
<IconCoin /> {blockCost.cost_amount} per {blockCost.cost_type}
|
||||
<IconCoin /> {blockCost.cost_amount} credits/{blockCost.cost_type}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import React from "react";
|
||||
import { beautifyString } from "@/lib/utils";
|
||||
import { Button } from "./ui/button";
|
||||
import {
|
||||
@ -10,6 +11,7 @@ import {
|
||||
} from "./ui/table";
|
||||
import { Clipboard } from "lucide-react";
|
||||
import { useToast } from "./ui/use-toast";
|
||||
import { ContentRenderer } from "./ui/render";
|
||||
|
||||
type DataTableProps = {
|
||||
title?: string;
|
||||
@ -72,17 +74,15 @@ export default function DataTable({
|
||||
>
|
||||
<Clipboard size={18} />
|
||||
</Button>
|
||||
{value
|
||||
.map((i) => {
|
||||
const text =
|
||||
typeof i === "object"
|
||||
? JSON.stringify(i, null, 2)
|
||||
: String(i);
|
||||
return truncateLongData && text.length > maxChars
|
||||
? text.slice(0, maxChars) + "..."
|
||||
: text;
|
||||
})
|
||||
.join(", ")}
|
||||
{value.map((item, index) => (
|
||||
<React.Fragment key={index}>
|
||||
<ContentRenderer
|
||||
value={item}
|
||||
truncateLongData={truncateLongData}
|
||||
/>
|
||||
{index < value.length - 1 && ", "}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</div>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
@ -579,21 +579,27 @@ const FlowEditor: React.FC<{
|
||||
>
|
||||
<Controls />
|
||||
<Background />
|
||||
<ControlPanel className="absolute z-10" controls={editorControls}>
|
||||
<BlocksControl
|
||||
pinBlocksPopover={pinBlocksPopover} // Pass the state to BlocksControl
|
||||
blocks={availableNodes}
|
||||
addBlock={addNode}
|
||||
/>
|
||||
<SaveControl
|
||||
agentMeta={savedAgent}
|
||||
onSave={(isTemplate) => requestSave(isTemplate ?? false)}
|
||||
agentDescription={agentDescription}
|
||||
onDescriptionChange={setAgentDescription}
|
||||
agentName={agentName}
|
||||
onNameChange={setAgentName}
|
||||
/>
|
||||
</ControlPanel>
|
||||
<ControlPanel
|
||||
className="absolute z-10"
|
||||
controls={editorControls}
|
||||
topChildren={
|
||||
<BlocksControl
|
||||
pinBlocksPopover={pinBlocksPopover} // Pass the state to BlocksControl
|
||||
blocks={availableNodes}
|
||||
addBlock={addNode}
|
||||
/>
|
||||
}
|
||||
botChildren={
|
||||
<SaveControl
|
||||
agentMeta={savedAgent}
|
||||
onSave={(isTemplate) => requestSave(isTemplate ?? false)}
|
||||
agentDescription={agentDescription}
|
||||
onDescriptionChange={setAgentDescription}
|
||||
agentName={agentName}
|
||||
onNameChange={setAgentName}
|
||||
/>
|
||||
}
|
||||
></ControlPanel>
|
||||
<PrimaryActionBar
|
||||
onClickAgentOutputs={() => runnerUIRef.current?.openRunnerOutput()}
|
||||
onClickRunAgent={() => {
|
||||
|
@ -5,19 +5,9 @@ import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
|
||||
import Image from "next/image";
|
||||
import getServerUser from "@/hooks/getServerUser";
|
||||
import ProfileDropdown from "./ProfileDropdown";
|
||||
import {
|
||||
IconCircleUser,
|
||||
IconMenu,
|
||||
IconPackage2,
|
||||
IconRefresh,
|
||||
IconSquareActivity,
|
||||
IconWorkFlow,
|
||||
} from "@/components/ui/icons";
|
||||
import AutoGPTServerAPI from "@/lib/autogpt-server-api";
|
||||
import { IconCircleUser, IconMenu } from "@/components/ui/icons";
|
||||
import CreditButton from "@/components/CreditButton";
|
||||
import { BsBoxes } from "react-icons/bs";
|
||||
import { LuLaptop } from "react-icons/lu";
|
||||
import { LuShoppingCart } from "react-icons/lu";
|
||||
import { NavBarButtons } from "./NavBarButtons";
|
||||
|
||||
export async function NavBar() {
|
||||
const isAvailable = Boolean(
|
||||
@ -27,7 +17,7 @@ export async function NavBar() {
|
||||
const { user } = await getServerUser();
|
||||
|
||||
return (
|
||||
<header className="sticky top-0 z-50 flex h-16 items-center gap-4 border-b bg-background px-4 md:rounded-b-3xl md:px-6 md:shadow-md">
|
||||
<header className="sticky top-0 z-50 mx-4 flex h-16 items-center gap-4 border-b bg-background p-3 md:rounded-b-2xl md:px-6 md:shadow">
|
||||
<div className="flex flex-1 items-center gap-4">
|
||||
<Sheet>
|
||||
<SheetTrigger asChild>
|
||||
@ -42,28 +32,11 @@ export async function NavBar() {
|
||||
</SheetTrigger>
|
||||
<SheetContent side="left">
|
||||
<nav className="grid gap-6 text-lg font-medium">
|
||||
<Link
|
||||
href="/marketplace"
|
||||
className="mt-4 flex flex-row items-center gap-2 text-muted-foreground hover:text-foreground"
|
||||
>
|
||||
<LuShoppingCart /> Marketplace
|
||||
</Link>
|
||||
<Link
|
||||
href="/"
|
||||
className="flex flex-row items-center gap-2 text-muted-foreground hover:text-foreground"
|
||||
>
|
||||
<LuLaptop /> Monitor
|
||||
</Link>
|
||||
<Link
|
||||
href="/build"
|
||||
className="flex flex-row items-center gap-2 text-muted-foreground hover:text-foreground"
|
||||
>
|
||||
<BsBoxes /> Build
|
||||
</Link>
|
||||
<NavBarButtons className="flex flex-row items-center gap-2" />
|
||||
</nav>
|
||||
</SheetContent>
|
||||
</Sheet>
|
||||
<nav className="hidden md:flex md:flex-row md:items-center md:gap-7 lg:gap-8">
|
||||
<nav className="hidden md:flex md:flex-row md:items-center md:gap-5 lg:gap-8">
|
||||
<div className="flex h-10 w-20 flex-1 flex-row items-center justify-center gap-2">
|
||||
<a href="https://agpt.co/">
|
||||
<Image
|
||||
@ -75,24 +48,7 @@ export async function NavBar() {
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<Link
|
||||
href="/marketplace"
|
||||
className="text-basehover:text-foreground flex flex-row items-center gap-2 font-semibold text-foreground"
|
||||
>
|
||||
<LuShoppingCart /> Marketplace
|
||||
</Link>
|
||||
<Link
|
||||
href="/"
|
||||
className="text-basehover:text-foreground flex flex-row items-center gap-2 font-semibold text-foreground"
|
||||
>
|
||||
<LuLaptop className="mr-1" /> Monitor
|
||||
</Link>
|
||||
<Link
|
||||
href="/build"
|
||||
className="flex flex-row items-center gap-2 text-base font-semibold text-foreground hover:text-foreground"
|
||||
>
|
||||
<BsBoxes className="mr-1" /> Build
|
||||
</Link>
|
||||
<NavBarButtons className="flex flex-row items-center gap-1 border border-white font-semibold hover:border-gray-900" />
|
||||
</nav>
|
||||
</div>
|
||||
<div className="flex flex-1 items-center justify-end gap-4">
|
||||
|
49
autogpt_platform/frontend/src/components/NavBarButtons.tsx
Normal file
49
autogpt_platform/frontend/src/components/NavBarButtons.tsx
Normal file
@ -0,0 +1,49 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { BsBoxes } from "react-icons/bs";
|
||||
import { LuLaptop } from "react-icons/lu";
|
||||
import { LuShoppingCart } from "react-icons/lu";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
export function NavBarButtons({ className }: { className?: string }) {
|
||||
"use client";
|
||||
|
||||
const pathname = usePathname();
|
||||
const buttons = [
|
||||
{
|
||||
href: "/marketplace",
|
||||
text: "Marketplace",
|
||||
icon: <LuShoppingCart />,
|
||||
},
|
||||
{
|
||||
href: "/",
|
||||
text: "Monitor",
|
||||
icon: <LuLaptop />,
|
||||
},
|
||||
{
|
||||
href: "/build",
|
||||
text: "Build",
|
||||
icon: <BsBoxes />,
|
||||
},
|
||||
];
|
||||
|
||||
const activeButton = buttons.find((button) => button.href === pathname);
|
||||
|
||||
console.log(">>>> ", activeButton);
|
||||
|
||||
return buttons.map((button) => (
|
||||
<Link
|
||||
key={button.href}
|
||||
href={button.href}
|
||||
className={cn(
|
||||
className,
|
||||
"rounded-xl p-3",
|
||||
activeButton === button ? "button bg-gray-950 text-white" : "",
|
||||
)}
|
||||
>
|
||||
{button.icon} {button.text}
|
||||
</Link>
|
||||
));
|
||||
}
|
@ -32,7 +32,7 @@ const PrimaryActionBar: React.FC<PrimaryActionBarProps> = ({
|
||||
const runButtonOnClick = !isRunning ? onClickRunAgent : requestStopRun;
|
||||
|
||||
return (
|
||||
<div className="absolute bottom-0 left-0 right-0 z-50 flex items-center justify-center p-4">
|
||||
<div className="absolute bottom-0 left-1/2 z-50 flex w-fit -translate-x-1/2 transform items-center justify-center p-4">
|
||||
<div className={`flex gap-4`}>
|
||||
<Tooltip key="ViewOutputs" delayDuration={500}>
|
||||
<TooltipTrigger asChild>
|
||||
@ -42,8 +42,10 @@ const PrimaryActionBar: React.FC<PrimaryActionBarProps> = ({
|
||||
size="primary"
|
||||
variant="outline"
|
||||
>
|
||||
<LogOut className="h-5 w-5" />
|
||||
<span className="text-lg font-medium">Agent Outputs </span>
|
||||
<LogOut className="hidden h-5 w-5 md:flex" />
|
||||
<span className="text-sm font-medium md:text-lg">
|
||||
Agent Outputs{" "}
|
||||
</span>
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
@ -62,7 +64,9 @@ const PrimaryActionBar: React.FC<PrimaryActionBarProps> = ({
|
||||
}}
|
||||
>
|
||||
{runButtonIcon}
|
||||
<span className="text-lg font-medium">{runButtonLabel}</span>
|
||||
<span className="text-sm font-medium md:text-lg">
|
||||
{runButtonLabel}
|
||||
</span>
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
|
@ -47,7 +47,7 @@ const TallyPopupSimple = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed bottom-6 right-6 z-50 flex items-center gap-4 p-3 transition-all duration-300 ease-in-out">
|
||||
<div className="fixed bottom-6 right-6 z-50 hidden items-center gap-4 p-3 transition-all duration-300 ease-in-out md:flex">
|
||||
<Button variant="default" onClick={resetTutorial} className="mb-0">
|
||||
Tutorial
|
||||
</Button>
|
||||
|
@ -138,7 +138,7 @@ export const BlocksControl: React.FC<BlocksControlProps> = ({
|
||||
))}
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="p-1">
|
||||
<CardContent className="border-t px-1 py-0">
|
||||
<ScrollArea
|
||||
className="h-[60vh]"
|
||||
data-id="blocks-control-scroll-area"
|
||||
|
@ -25,7 +25,8 @@ export type Control = {
|
||||
|
||||
interface ControlPanelProps {
|
||||
controls: Control[];
|
||||
children?: React.ReactNode;
|
||||
topChildren?: React.ReactNode;
|
||||
botChildren?: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
@ -39,14 +40,15 @@ interface ControlPanelProps {
|
||||
*/
|
||||
export const ControlPanel = ({
|
||||
controls,
|
||||
children,
|
||||
topChildren,
|
||||
botChildren,
|
||||
className,
|
||||
}: ControlPanelProps) => {
|
||||
return (
|
||||
<Card className={cn("w-14", className)}>
|
||||
<Card className={cn("m-4 mt-24 w-14", className)}>
|
||||
<CardContent className="p-0">
|
||||
<div className="rounded-radius flex flex-col items-center gap-8 px-2 sm:py-5">
|
||||
{children}
|
||||
<div className="flex flex-col items-center gap-3 rounded-xl border py-3">
|
||||
{topChildren}
|
||||
<Separator />
|
||||
{controls.map((control, index) => (
|
||||
<Tooltip key={index} delayDuration={500}>
|
||||
@ -67,6 +69,8 @@ export const ControlPanel = ({
|
||||
<TooltipContent side="right">{control.label}</TooltipContent>
|
||||
</Tooltip>
|
||||
))}
|
||||
<Separator />
|
||||
{botChildren}
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
@ -111,6 +111,9 @@ textarea::placeholder {
|
||||
}
|
||||
|
||||
.flow-container {
|
||||
width: 100%;
|
||||
height: 600px; /* Adjust this height as needed */
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ const buttonVariants = cva(
|
||||
default: "h-9 px-4 py-2",
|
||||
sm: "h-8 rounded-md px-3 text-xs",
|
||||
lg: "h-10 rounded-md px-8",
|
||||
primary: "h-14 w-44 rounded-2xl",
|
||||
primary: "md:h-14 md:w-44 rounded-2xl h-10 w-28",
|
||||
icon: "h-9 w-9",
|
||||
},
|
||||
},
|
||||
|
82
autogpt_platform/frontend/src/components/ui/render.tsx
Normal file
82
autogpt_platform/frontend/src/components/ui/render.tsx
Normal file
@ -0,0 +1,82 @@
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import Image from "next/image";
|
||||
|
||||
const getYouTubeVideoId = (url: string) => {
|
||||
const regExp =
|
||||
/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/;
|
||||
const match = url.match(regExp);
|
||||
return match && match[7].length === 11 ? match[7] : null;
|
||||
};
|
||||
|
||||
const isValidVideoUrl = (url: string): boolean => {
|
||||
const videoExtensions = /\.(mp4|webm|ogg)$/i;
|
||||
const youtubeRegex = /^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.?be)\/.+$/;
|
||||
return videoExtensions.test(url) || youtubeRegex.test(url);
|
||||
};
|
||||
|
||||
const isValidImageUrl = (url: string): boolean => {
|
||||
const imageExtensions = /\.(jpeg|jpg|gif|png|svg|webp)$/i;
|
||||
return imageExtensions.test(url);
|
||||
};
|
||||
|
||||
const VideoRenderer: React.FC<{ videoUrl: string }> = ({ videoUrl }) => {
|
||||
const videoId = getYouTubeVideoId(videoUrl);
|
||||
return (
|
||||
<div className="w-full p-2">
|
||||
{videoId ? (
|
||||
<iframe
|
||||
width="100%"
|
||||
height="315"
|
||||
src={`https://www.youtube.com/embed/${videoId}`}
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
></iframe>
|
||||
) : (
|
||||
<video controls width="100%" height="315">
|
||||
<source src={videoUrl} type="video/mp4" />
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const ImageRenderer: React.FC<{ imageUrl: string }> = ({ imageUrl }) => (
|
||||
<div className="w-full p-2">
|
||||
<img
|
||||
src={imageUrl}
|
||||
alt="Image"
|
||||
className="h-auto max-w-full"
|
||||
width="100%"
|
||||
height="auto"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
const TextRenderer: React.FC<{ value: any; truncateLongData?: boolean }> = ({
|
||||
value,
|
||||
truncateLongData,
|
||||
}) => {
|
||||
const maxChars = 100;
|
||||
const text =
|
||||
typeof value === "object" ? JSON.stringify(value, null, 2) : String(value);
|
||||
return truncateLongData && text.length > maxChars
|
||||
? text.slice(0, maxChars) + "..."
|
||||
: text;
|
||||
};
|
||||
|
||||
export const ContentRenderer: React.FC<{
|
||||
value: any;
|
||||
truncateLongData?: boolean;
|
||||
}> = ({ value, truncateLongData }) => {
|
||||
if (typeof value === "string") {
|
||||
if (isValidVideoUrl(value)) {
|
||||
return <VideoRenderer videoUrl={value} />;
|
||||
} else if (isValidImageUrl(value)) {
|
||||
return <ImageRenderer imageUrl={value} />;
|
||||
}
|
||||
}
|
||||
return <TextRenderer value={value} truncateLongData={truncateLongData} />;
|
||||
};
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
apiVersion: cloud.google.com/v1
|
||||
kind: BackendConfig
|
||||
metadata:
|
||||
name: {{ include "autogpt-market.fullname" . }}
|
||||
name: {{ include "autogpt-market.fullname" . }}-backend-config
|
||||
spec:
|
||||
customRequestHeaders:
|
||||
headers:
|
||||
|
@ -41,7 +41,7 @@ spec:
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
containerPort: {{ .Values.service.targetPort }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
||||
@ -53,15 +53,6 @@ spec:
|
||||
volumeMounts:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: cloud-sql-proxy
|
||||
image: "{{ .Values.cloudSqlProxy.image.repository }}:{{ .Values.cloudSqlProxy.image.tag }}"
|
||||
args:
|
||||
- "--structured-logs"
|
||||
{{- if .Values.cloudSqlProxy.usePrivateIp }}
|
||||
- "--private-ip"
|
||||
{{- end }}
|
||||
- "--port={{ .Values.cloudSqlProxy.port }}"
|
||||
- "{{ .Values.cloudSqlProxy.instanceConnectionName }}"
|
||||
{{- with .Values.volumes }}
|
||||
volumes:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
@ -4,11 +4,15 @@ metadata:
|
||||
name: {{ include "autogpt-market.fullname" . }}
|
||||
labels:
|
||||
{{- include "autogpt-market.labels" . | nindent 4 }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
targetPort: {{ .Values.service.targetPort }}
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
|
@ -12,11 +12,11 @@ serviceAccount:
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8000
|
||||
targetPort: 8005
|
||||
port: 8015
|
||||
targetPort: 8015
|
||||
annotations:
|
||||
cloud.google.com/neg: '{"ingress": true}'
|
||||
beta.cloud.google.com/backend-config: '{"default": "autogpt-market"}'
|
||||
beta.cloud.google.com/backend-config: '{"default": "autogpt-market-backend-config"}'
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
@ -25,7 +25,7 @@ ingress:
|
||||
kubernetes.io/ingress.class: gce
|
||||
kubernetes.io/ingress.global-static-ip-name: "agpt-dev-agpt-market-ip"
|
||||
networking.gke.io/managed-certificates: "autogpt-market-cert"
|
||||
kubernetes.io/ingress.allow-http: "false"
|
||||
networking.gke.io/v1beta1.FrontendConfig: "autogpt-market-frontend-config"
|
||||
hosts:
|
||||
- host: dev-market.agpt.co
|
||||
paths:
|
||||
@ -34,12 +34,12 @@ ingress:
|
||||
backend:
|
||||
service:
|
||||
name: autogpt-market
|
||||
port: 8000
|
||||
port: 8015
|
||||
defaultBackend:
|
||||
service:
|
||||
name: autogpt-market
|
||||
port:
|
||||
number: 8000
|
||||
number: 8015
|
||||
|
||||
resources:
|
||||
requests:
|
||||
@ -52,7 +52,7 @@ resources:
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
port: 8015
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 10
|
||||
@ -60,7 +60,7 @@ livenessProbe:
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
port: 8015
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 10
|
||||
@ -95,9 +95,14 @@ cors:
|
||||
|
||||
env:
|
||||
APP_ENV: "dev"
|
||||
PYRO_HOST: "0.0.0.0"
|
||||
ENABLE_AUTH: "true"
|
||||
SUPABASE_JWT_SECRET: ""
|
||||
SUPABASE_ANON_KEY: ""
|
||||
SUPABASE_URL: ""
|
||||
DATABASE_URL: ""
|
||||
SENTRY_DSN: ""
|
||||
SUPABASE_SERVICE_ROLE_KEY: ""
|
||||
GITHUB_CLIENT_ID: ""
|
||||
GITHUB_CLIENT_SECRET: ""
|
||||
FRONTEND_BASE_URL: "https://dev-builder.agpt.co/"
|
||||
SUPABASE_URL: "https://adfjtextkuilwuhzdjpf.supabase.co"
|
||||
BACKEND_CORS_ALLOW_ORIGINS: "https://dev-builder.agpt.co"
|
109
autogpt_platform/infra/helm/autogpt-market/values.prod.yaml
Normal file
109
autogpt_platform/infra/helm/autogpt-market/values.prod.yaml
Normal file
@ -0,0 +1,109 @@
|
||||
# prod values, overwrite base values as needed.
|
||||
|
||||
image:
|
||||
repository: us-east1-docker.pkg.dev/agpt-prod/agpt-market-prod/agpt-market-prod
|
||||
pullPolicy: Always
|
||||
tag: "latest"
|
||||
|
||||
serviceAccount:
|
||||
annotations:
|
||||
iam.gke.io/gcp-service-account: "prod-agpt-market-sa@agpt-prod.iam.gserviceaccount.com"
|
||||
name: "prod-agpt-market-sa"
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8015
|
||||
targetPort: 8015
|
||||
annotations:
|
||||
cloud.google.com/neg: '{"ingress": true}'
|
||||
beta.cloud.google.com/backend-config: '{"default": "autogpt-market-backend-config"}'
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: "gce"
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: gce
|
||||
kubernetes.io/ingress.global-static-ip-name: "agpt-prod-agpt-market-ip"
|
||||
networking.gke.io/managed-certificates: "autogpt-market-cert"
|
||||
networking.gke.io/v1beta1.FrontendConfig: "autogpt-market-frontend-config"
|
||||
hosts:
|
||||
- host: market.agpt.co
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: autogpt-market
|
||||
port: 8015
|
||||
defaultBackend:
|
||||
service:
|
||||
name: autogpt-market
|
||||
port:
|
||||
number: 8015
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: 2
|
||||
memory: 2Gi
|
||||
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8015
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 12
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8015
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 12
|
||||
|
||||
domain: "market.agpt.co"
|
||||
|
||||
cloudSqlProxy:
|
||||
image:
|
||||
repository: gcr.io/cloud-sql-connectors/cloud-sql-proxy
|
||||
tag: 2.11.4
|
||||
instanceConnectionName: "agpt-prod:us-central1:agpt-server-prod"
|
||||
port: 5432
|
||||
resources:
|
||||
requests:
|
||||
memory: "2Gi"
|
||||
cpu: "1"
|
||||
|
||||
cors:
|
||||
allowOrigin: "https://platform.agpt.co"
|
||||
allowMethods:
|
||||
- "GET"
|
||||
- "POST"
|
||||
- "PUT"
|
||||
- "DELETE"
|
||||
- "OPTIONS"
|
||||
allowHeaders:
|
||||
- "Content-Type"
|
||||
- "Authorization"
|
||||
maxAge: 3600
|
||||
allowCredentials: true
|
||||
|
||||
env:
|
||||
APP_ENV: "prod"
|
||||
PYRO_HOST: "0.0.0.0"
|
||||
ENABLE_AUTH: "true"
|
||||
SUPABASE_JWT_SECRET: ""
|
||||
DATABASE_URL: ""
|
||||
SENTRY_DSN: ""
|
||||
SUPABASE_SERVICE_ROLE_KEY: ""
|
||||
GITHUB_CLIENT_ID: ""
|
||||
GITHUB_CLIENT_SECRET: ""
|
||||
FRONTEND_BASE_URL: "https://platform.agpt.co/"
|
||||
SUPABASE_URL: "https://bgwpwdsxblryihinutbx.supabase.co"
|
||||
BACKEND_CORS_ALLOW_ORIGINS: "https://platform.agpt.co"
|
||||
|
@ -71,15 +71,6 @@ resources: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
|
15
autogpt_platform/infra/helm/redis-values.prod.yaml
Normal file
15
autogpt_platform/infra/helm/redis-values.prod.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
architecture: standalone
|
||||
auth:
|
||||
enabled: true
|
||||
password: "" #empty on purpose
|
||||
master:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 3Gi
|
||||
configmap:
|
||||
redis.conf: |
|
||||
bind 127.0.0.1
|
||||
protected-mode yes
|
||||
requirepass password
|
||||
replica:
|
||||
replicaCount: 0
|
100
autogpt_platform/infra/terraform/environments/prod.tfvars
Normal file
100
autogpt_platform/infra/terraform/environments/prod.tfvars
Normal file
@ -0,0 +1,100 @@
|
||||
project_id = "agpt-prod"
|
||||
region = "us-central1"
|
||||
zone = "us-central1-a"
|
||||
network_name = "prod-gke-network"
|
||||
subnet_name = "prod-gke-subnet"
|
||||
subnet_cidr = "10.0.0.0/24"
|
||||
cluster_name = "prod-gke-cluster"
|
||||
node_count = 4
|
||||
node_pool_name = "prod-main-pool"
|
||||
machine_type = "e2-highmem-4"
|
||||
disk_size_gb = 100
|
||||
static_ip_names = ["agpt-backend-ip", "agpt-frontend-ip", "agpt-ws-backend-ip", "agpt-market-ip"]
|
||||
|
||||
|
||||
service_accounts = {
|
||||
"prod-agpt-backend-sa" = {
|
||||
display_name = "AutoGPT prod backend Account"
|
||||
description = "Service account for agpt prod backend"
|
||||
},
|
||||
"prod-agpt-frontend-sa" = {
|
||||
display_name = "AutoGPT prod frontend Account"
|
||||
description = "Service account for agpt prod frontend"
|
||||
},
|
||||
"prod-agpt-ws-backend-sa" = {
|
||||
display_name = "AutoGPT prod WebSocket backend Account"
|
||||
description = "Service account for agpt prod websocket backend"
|
||||
},
|
||||
"prod-agpt-market-sa" = {
|
||||
display_name = "AutoGPT prod Market backend Account"
|
||||
description = "Service account for agpt prod market backend"
|
||||
}
|
||||
}
|
||||
|
||||
workload_identity_bindings = {
|
||||
"prod-agpt-backend-workload-identity" = {
|
||||
service_account_name = "prod-agpt-backend-sa"
|
||||
namespace = "prod-agpt"
|
||||
ksa_name = "prod-agpt-backend-sa"
|
||||
},
|
||||
"prod-agpt-frontend-workload-identity" = {
|
||||
service_account_name = "prod-agpt-frontend-sa"
|
||||
namespace = "prod-agpt"
|
||||
ksa_name = "prod-agpt-frontend-sa"
|
||||
},
|
||||
"prod-agpt-ws-backend-workload-identity" = {
|
||||
service_account_name = "prod-agpt-ws-backend-sa"
|
||||
namespace = "prod-agpt"
|
||||
ksa_name = "prod-agpt-ws-backend-sa"
|
||||
},
|
||||
"prod-agpt-market-workload-identity" = {
|
||||
service_account_name = "prod-agpt-market-sa"
|
||||
namespace = "prod-agpt"
|
||||
ksa_name = "prod-agpt-market-sa"
|
||||
}
|
||||
}
|
||||
|
||||
role_bindings = {
|
||||
"roles/container.developer" = [
|
||||
"serviceAccount:prod-agpt-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-frontend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-ws-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-market-sa@agpt-prod.iam.gserviceaccount.com"
|
||||
],
|
||||
"roles/cloudsql.client" = [
|
||||
"serviceAccount:prod-agpt-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-frontend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-market-sa@agpt-prod.iam.gserviceaccount.com"
|
||||
],
|
||||
"roles/cloudsql.editor" = [
|
||||
"serviceAccount:prod-agpt-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-frontend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-market-sa@agpt-prod.iam.gserviceaccount.com"
|
||||
],
|
||||
"roles/cloudsql.instanceUser" = [
|
||||
"serviceAccount:prod-agpt-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-frontend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-market-sa@agpt-prod.iam.gserviceaccount.com"
|
||||
],
|
||||
"roles/iam.workloadIdentityUser" = [
|
||||
"serviceAccount:prod-agpt-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-frontend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-ws-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-market-sa@agpt-prod.iam.gserviceaccount.com"
|
||||
]
|
||||
"roles/compute.networkUser" = [
|
||||
"serviceAccount:prod-agpt-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-frontend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-ws-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-market-sa@agpt-prod.iam.gserviceaccount.com"
|
||||
],
|
||||
"roles/container.hostServiceAgentUser" = [
|
||||
"serviceAccount:prod-agpt-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-frontend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-ws-backend-sa@agpt-prod.iam.gserviceaccount.com",
|
||||
"serviceAccount:prod-agpt-market-sa@agpt-prod.iam.gserviceaccount.com"
|
||||
]
|
||||
}
|
||||
|
||||
pods_ip_cidr_range = "10.1.0.0/16"
|
||||
services_ip_cidr_range = "10.2.0.0/20"
|
@ -1,6 +1,8 @@
|
||||
site_name: AutoGPT Documentation
|
||||
site_url: https://docs.agpt.co/
|
||||
repo_url: https://github.com/Significant-Gravitas/AutoGPT
|
||||
repo_name: AutoGPT
|
||||
edit_uri: edit/master/docs/content
|
||||
docs_dir: content
|
||||
nav:
|
||||
- Home: index.md
|
||||
@ -10,7 +12,7 @@ nav:
|
||||
- Setup: server/setup.md
|
||||
- Advanced Setup: server/advanced_setup.md
|
||||
- Using Ollama: server/ollama.md
|
||||
- Using D-ID: serveer/d_id.md
|
||||
- Using D-ID: server/d_id.md
|
||||
|
||||
- AutoGPT Agent:
|
||||
- Introduction: AutoGPT/index.md
|
||||
@ -69,14 +71,27 @@ nav:
|
||||
theme:
|
||||
name: material
|
||||
custom_dir: overrides
|
||||
language: en
|
||||
icon:
|
||||
repo: fontawesome/brands/github
|
||||
logo: material/book-open-variant
|
||||
favicon: favicon.png
|
||||
edit: material/pencil
|
||||
view: material/eye
|
||||
favicon: assets/favicon.png
|
||||
features:
|
||||
- navigation.sections
|
||||
- toc.follow
|
||||
- navigation.footer
|
||||
- navigation.top
|
||||
- navigation.tracking
|
||||
- navigation.tabs
|
||||
# - navigation.path
|
||||
- toc.follow
|
||||
- toc.integrate
|
||||
- content.action.edit
|
||||
- content.action.view
|
||||
- content.code.copy
|
||||
- content.code.annotate
|
||||
- content.tabs.link
|
||||
palette:
|
||||
# Palette toggle for light mode
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
@ -137,6 +152,20 @@ markdown_extensions:
|
||||
plugins:
|
||||
- table-reader
|
||||
- search
|
||||
- git-revision-date-localized:
|
||||
enable_creation_date: true
|
||||
|
||||
|
||||
extra:
|
||||
social:
|
||||
- icon: fontawesome/brands/github
|
||||
link: https://github.com/Significant-Gravitas/AutoGPT
|
||||
- icon: fontawesome/brands/x-twitter
|
||||
link: https://x.com/Auto_GPT
|
||||
- icon: fontawesome/brands/instagram
|
||||
link: https://www.instagram.com/autogpt/
|
||||
- icon: fontawesome/brands/discord
|
||||
link: https://discord.gg/autogpt
|
||||
|
||||
extra_javascript:
|
||||
- https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js
|
||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
@ -2,3 +2,4 @@ mkdocs
|
||||
mkdocs-material
|
||||
mkdocs-table-reader-plugin
|
||||
pymdown-extensions
|
||||
mkdocs-git-revision-date-localized-plugin
|
||||
|
Loading…
Reference in New Issue
Block a user