From 03bdb7e23347a8a1eee9ff01a26d57115d2ee883 Mon Sep 17 00:00:00 2001 From: Josh XT <102809327+Josh-XT@users.noreply.github.com> Date: Tue, 25 Apr 2023 22:30:41 -0400 Subject: [PATCH] Update port to 7437 from 5000 for #93, #79, and #61 (#99) * Ooba endpoint update * Switch to port 7437 from 5000 * Update port to 7437 from 5000 --- app.py | 2 +- docker-compose-mac.yml | 4 +- docker-compose.yml | 4 +- docs/README.md | 2 +- frontend/components/agent/AgentAdmin.js | 4 +- frontend/components/agent/AgentChat.js | 2 +- frontend/components/agent/AgentCommand.js | 2 +- frontend/components/agent/AgentCommandList.js | 2 +- frontend/components/agent/AgentControl.js | 4 +- frontend/components/agent/AgentInstruct.js | 2 +- frontend/components/agent/AgentObjective.js | 8 +-- .../components/content/DoubleSidedMenu.js | 2 +- frontend/pages/agent/[agent].js | 2 +- frontend/pages/agent/index.js | 2 +- frontend/pages/chain/[chain].js | 2 +- frontend/pages/chain/index.js | 2 +- frontend/pages/new/agent.js | 4 +- frontend/pages/new/chain.js | 4 +- frontend/pages/new/prompt.js | 4 +- frontend/pages/prompt/[prompt].js | 2 +- frontend/pages/prompt/index.js | 2 +- frontend/pages/provider/[provider].js | 2 +- frontend/pages/provider/index.js | 2 +- notebook.ipynb | 2 +- notebooks/bard.ipynb | 4 +- notebooks/chatgpt.ipynb | 4 +- notebooks/llamacpp.ipynb | 4 +- notebooks/oobabooga.ipynb | 60 +++++++++++++++++-- notebooks/openai.ipynb | 4 +- 29 files changed, 97 insertions(+), 47 deletions(-) diff --git a/app.py b/app.py index 0cdc132e93a6..f77ccff21a4c 100644 --- a/app.py +++ b/app.py @@ -273,4 +273,4 @@ async def update_prompt(prompt_name: str, prompt: Prompt) -> ResponseMessage: raise HTTPException(status_code=404, detail=str(e)) if __name__ == "__main__": - uvicorn.run(app, host="127.0.0.1", port=5000) + uvicorn.run(app, host="127.0.0.1", port=7437) diff --git a/docker-compose-mac.yml b/docker-compose-mac.yml index 528822d016d7..67405404f160 100644 --- a/docker-compose-mac.yml +++ b/docker-compose-mac.yml @@ -7,7 +7,7 @@ services: ports: - "80:3000" environment: - NEXT_PUBLIC_API_URI: ${NEXT_PUBLIC_API_URI:-http://backend:5001} + NEXT_PUBLIC_API_URI: ${NEXT_PUBLIC_API_URI:-http://backend:7437} env_file: - .env depends_on: @@ -17,6 +17,6 @@ services: context: . dockerfile: Dockerfile-mac-backend ports: - - "5001:5000" + - "7437:7437" env_file: - .env diff --git a/docker-compose.yml b/docker-compose.yml index bcaf0a52606d..368a8fceae36 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: ports: - "80:3000" environment: - NEXT_PUBLIC_API_URI: ${NEXT_PUBLIC_API_URI:-http://backend:5000} + NEXT_PUBLIC_API_URI: ${NEXT_PUBLIC_API_URI:-http://backend:7437} env_file: - .env depends_on: @@ -17,6 +17,6 @@ services: context: . dockerfile: Dockerfile-backend ports: - - "5001:5000" + - "7437:7437" env_file: - .env diff --git a/docs/README.md b/docs/README.md index 954ded9c403e..8c1c2de655d0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -166,7 +166,7 @@ For a detailed explanation of each setting, refer to the `.env.example` file pro Agent-LLM provides several API endpoints for managing agents, managing tasks, and managing chains. -To learn more about the API endpoints and their usage, visit the API documentation at http://localhost:5000/docs (Swagger) or http://localhost:5000/redoc (Redoc). +To learn more about the API endpoints and their usage, visit the API documentation at http://localhost:7437/docs (Swagger) or http://localhost:7437/redoc (Redoc). ## Extending Functionality diff --git a/frontend/components/agent/AgentAdmin.js b/frontend/components/agent/AgentAdmin.js index 2c02a98f0901..68487997aa73 100644 --- a/frontend/components/agent/AgentAdmin.js +++ b/frontend/components/agent/AgentAdmin.js @@ -12,11 +12,11 @@ export default function AgentCommandsList({ friendly_name, name, args, enabled } const agentName = useRouter().query.agent; const [newName, setNewName] = useState(""); const handleDelete = async () => { - await axios.delete(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}`) + await axios.delete(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}`) mutate(`agents`); }; const handleRename = async () => { - await axios.put(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}`, { new_name: newName }) + await axios.put(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}`, { new_name: newName }) mutate(`agents`); }; return ( diff --git a/frontend/components/agent/AgentChat.js b/frontend/components/agent/AgentChat.js index 96beca64cc8d..208f45c144c1 100644 --- a/frontend/components/agent/AgentChat.js +++ b/frontend/components/agent/AgentChat.js @@ -12,7 +12,7 @@ export default function AgentChat() { const [message, setMessage] = useState(""); const agentName = useRouter().query.agent; const MessageAgent = async (message) => { - const response = await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}/chat`, { prompt: message }).data.response; + const response = await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}/chat`, { prompt: message }).data.response; setChatHistory((old) => [ ...old, `You: ${message}`, diff --git a/frontend/components/agent/AgentCommand.js b/frontend/components/agent/AgentCommand.js index a9efb846755b..8fe6b5690f94 100644 --- a/frontend/components/agent/AgentCommand.js +++ b/frontend/components/agent/AgentCommand.js @@ -12,7 +12,7 @@ export default function AgentCommandsList({ friendly_name, name, args, enabled } //const [open, setOpen] = useState(false); //const [theArgs, setTheArgs] = useState({...args}); const handleToggleCommand = async () => { - await axios.patch(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}/command`, { command_name: friendly_name, enable: enabled? "false" : "true" }); + await axios.patch(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}/command`, { command_name: friendly_name, enable: enabled? "false" : "true" }); mutate(`agent/${agentName}/commands`); }; /* diff --git a/frontend/components/agent/AgentCommandList.js b/frontend/components/agent/AgentCommandList.js index 63db4f0a4a33..a1306ba54ff5 100644 --- a/frontend/components/agent/AgentCommandList.js +++ b/frontend/components/agent/AgentCommandList.js @@ -13,7 +13,7 @@ import AgentCommand from "./AgentCommand"; export default function AgentCommandList({ data }) { const agentName = useRouter().query.agent; const handleToggleAllCommands = async () => { - await axios.patch(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}/command`, { command_name: "*", enable: data.every((command) => command.enabled) ? "false" : "true" }); + await axios.patch(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}/command`, { command_name: "*", enable: data.every((command) => command.enabled) ? "false" : "true" }); mutate(`agent/${agentName}/commands`); } return ( diff --git a/frontend/components/agent/AgentControl.js b/frontend/components/agent/AgentControl.js index 59a50ac84b6e..1ff62bc8c401 100644 --- a/frontend/components/agent/AgentControl.js +++ b/frontend/components/agent/AgentControl.js @@ -7,8 +7,8 @@ import AgentCommandsList from './AgentCommandList'; import MenuAgentList from './AgentList'; export default function AgentControl({ data }) { const agentName = useRouter().query.agent; - const commands = useSWR(`agent/${agentName}/commands`, async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}/command`)).data.commands); - const agents = useSWR('agent', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent`)).data.agents); + const commands = useSWR(`agent/${agentName}/commands`, async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}/command`)).data.commands); + const agents = useSWR('agent', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent`)).data.agents); return ; } diff --git a/frontend/components/agent/AgentInstruct.js b/frontend/components/agent/AgentInstruct.js index ed283d457d84..b92058b39273 100644 --- a/frontend/components/agent/AgentInstruct.js +++ b/frontend/components/agent/AgentInstruct.js @@ -12,7 +12,7 @@ export default function AgentInstruct() { const [instruction, setInstruction] = useState(""); const agentName = useRouter().query.agent; const InstructAgent = async () => { - const response = (await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}/instruct`, { prompt: instruction })).data.response; + const response = (await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}/instruct`, { prompt: instruction })).data.response; console.log(response); setResponseHistory((old) => [ ...old, diff --git a/frontend/components/agent/AgentObjective.js b/frontend/components/agent/AgentObjective.js index b05cd3550b84..08e9bb2c3235 100644 --- a/frontend/components/agent/AgentObjective.js +++ b/frontend/components/agent/AgentObjective.js @@ -14,9 +14,9 @@ export default function AgentObjective() { const [running, setRunning] = useState(false); const [objective, setObjective] = useState(""); const agentName = useRouter().query.agent; - const taskStatus = useSWR(`agent/${agentName}/task`, async () => (running ? (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}/task`)).data.output.split("\n") : null), { refreshInterval: running?3000:0, revalidateOnFocus: false }); + const taskStatus = useSWR(`agent/${agentName}/task`, async () => (running ? (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}/task`)).data.output.split("\n") : null), { refreshInterval: running?3000:0, revalidateOnFocus: false }); const queryRunning = useCallback(async () => { - setRunning((await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}/task/status`)).data.status, {objective: objective}); + setRunning((await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}/task/status`)).data.status, {objective: objective}); }, [agentName]); useEffect(() => { queryRunning(); @@ -24,10 +24,10 @@ export default function AgentObjective() { const toggleRunning = async () => { if (running) { - await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}/task`, {objective: "" }); + await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}/task`, {objective: "" }); } else { - await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}/task`, { objective: objective }); + await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}/task`, { objective: objective }); } await queryRunning(); mutate("agents"); diff --git a/frontend/components/content/DoubleSidedMenu.js b/frontend/components/content/DoubleSidedMenu.js index a84deee2cc63..e087a75009c9 100644 --- a/frontend/components/content/DoubleSidedMenu.js +++ b/frontend/components/content/DoubleSidedMenu.js @@ -85,7 +85,7 @@ export default function AgentControl({ title, leftHeading, leftSWR, leftMenu, ri setOpenRight(false); }; const agentName = useRouter().query.agent; - const commands = useSWR(`agent/${agentName}/commands`, async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}/command`)).data.commands); + const commands = useSWR(`agent/${agentName}/commands`, async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}/command`)).data.commands); return (<> diff --git a/frontend/pages/agent/[agent].js b/frontend/pages/agent/[agent].js index cf6a819988b3..68654af1215a 100644 --- a/frontend/pages/agent/[agent].js +++ b/frontend/pages/agent/[agent].js @@ -5,6 +5,6 @@ import AgentControl from '@/components/agent/AgentControl'; import ContentSWR from '@/components/content/ContentSWR'; export default function Agent() { const agentName = useRouter().query.agent; - const agent = useSWR(`agent/${agentName}`, async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent/${agentName}`)).data); + const agent = useSWR(`agent/${agentName}`, async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent/${agentName}`)).data); return ; } \ No newline at end of file diff --git a/frontend/pages/agent/index.js b/frontend/pages/agent/index.js index 384eeb068690..068df0e5e392 100644 --- a/frontend/pages/agent/index.js +++ b/frontend/pages/agent/index.js @@ -7,7 +7,7 @@ import DoubleSidedMenu from '@/components/content/DoubleSidedMenu'; import MenuAgentList from '@/components/agent/AgentList'; export default function Home() { const docs = useSWR('docs/prompt', async () => (await axios.get("https://raw.githubusercontent.com/Josh-XT/Agent-LLM/main/docs/concepts/AGENT.md")).data); - const agents = useSWR('agent', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent`)).data.agents); + const agents = useSWR('agent', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent`)).data.agents); return ( {data} diff --git a/frontend/pages/chain/[chain].js b/frontend/pages/chain/[chain].js index 44381a88ccdd..8471b03e68fb 100644 --- a/frontend/pages/chain/[chain].js +++ b/frontend/pages/chain/[chain].js @@ -5,6 +5,6 @@ import ContentSWR from '@/components/content/ContentSWR'; import ChainControl from '@/components/chain/ChainControl'; export default function Chain() { const chainName = useRouter().query.chain; - const chain = useSWR(`chain/${chainName}`, async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/chain/${chainName}`)).data); + const chain = useSWR(`chain/${chainName}`, async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/chain/${chainName}`)).data); return ; } \ No newline at end of file diff --git a/frontend/pages/chain/index.js b/frontend/pages/chain/index.js index 9411f8d16c76..8dffe16a6ff3 100644 --- a/frontend/pages/chain/index.js +++ b/frontend/pages/chain/index.js @@ -7,7 +7,7 @@ import DoubleSidedMenu from '@/components/content/DoubleSidedMenu'; import ChainList from '@/components/chain/ChainList'; export default function Home() { const docs = useSWR('docs/prompt', async () => (await axios.get("https://raw.githubusercontent.com/Josh-XT/Agent-LLM/main/docs/concepts/CHAIN.md")).data); - const chains = useSWR('chain', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/chain`)).data); + const chains = useSWR('chain', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/chain`)).data); return ( {data} diff --git a/frontend/pages/new/agent.js b/frontend/pages/new/agent.js index dfb02c79ef85..302a41272e7d 100644 --- a/frontend/pages/new/agent.js +++ b/frontend/pages/new/agent.js @@ -9,10 +9,10 @@ import AgentList from '@/components/agent/AgentList'; export default function Home() { const [name, setName] = useState(""); const handleCreate = async () => { - await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent`, { agent_name: name }); + await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent`, { agent_name: name }); mutate("agent"); } - const agents = useSWR('agent', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/agent`)).data.agents); + const agents = useSWR('agent', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/agent`)).data.agents); return Add a New Agent diff --git a/frontend/pages/new/chain.js b/frontend/pages/new/chain.js index 269dbd23d776..fa04d864509b 100644 --- a/frontend/pages/new/chain.js +++ b/frontend/pages/new/chain.js @@ -10,10 +10,10 @@ export default function Home() { const [name, setName] = useState(""); const [chain, setChain] = useState(""); const handleCreate = async () => { - await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/chain`, { chain_name: name, chain: chain }); + await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/chain`, { chain_name: name, chain: chain }); mutate("chain"); } - const chains = useSWR('chain', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/chain`)).data); + const chains = useSWR('chain', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/chain`)).data); return Add a New Chain diff --git a/frontend/pages/new/prompt.js b/frontend/pages/new/prompt.js index f8516c8c9596..29129f60625f 100644 --- a/frontend/pages/new/prompt.js +++ b/frontend/pages/new/prompt.js @@ -10,10 +10,10 @@ export default function Home() { const [name, setName] = useState(""); const [prompt, setPrompt] = useState(""); const handleCreate = async () => { - await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/prompt`, { prompt_name: name, prompt: prompt }); + await axios.post(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/prompt`, { prompt_name: name, prompt: prompt }); mutate("prompt"); } - const prompts = useSWR('prompt', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/prompt`)).data.prompts); + const prompts = useSWR('prompt', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/prompt`)).data.prompts); return Add a New Prompt diff --git a/frontend/pages/prompt/[prompt].js b/frontend/pages/prompt/[prompt].js index 06e3654cfbee..ce7a5154f73f 100644 --- a/frontend/pages/prompt/[prompt].js +++ b/frontend/pages/prompt/[prompt].js @@ -5,6 +5,6 @@ import ContentSWR from '@/components/content/ContentSWR'; import PromptControl from '@/components/prompt/PromptControl'; export default function Agent() { const promptName = useRouter().query.prompt; - const prompt = useSWR(`prompt/${promptName}`, async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/prompt/${promptName}`)).data); + const prompt = useSWR(`prompt/${promptName}`, async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/prompt/${promptName}`)).data); return ; } \ No newline at end of file diff --git a/frontend/pages/prompt/index.js b/frontend/pages/prompt/index.js index 0fa816572091..7bd3540349d1 100644 --- a/frontend/pages/prompt/index.js +++ b/frontend/pages/prompt/index.js @@ -9,7 +9,7 @@ import {useRouter} from 'next/router'; export default function Home() { const router = useRouter(); const docs = useSWR('docs/prompt', async () => (await axios.get("https://raw.githubusercontent.com/Josh-XT/Agent-LLM/main/docs/main/concepts/PROMPT.md")).data); - const prompts = useSWR('prompt', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/prompt`)).data.prompts); + const prompts = useSWR('prompt', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/prompt`)).data.prompts); return ( {data} diff --git a/frontend/pages/provider/[provider].js b/frontend/pages/provider/[provider].js index c257274d5bbe..060d91e228af 100644 --- a/frontend/pages/provider/[provider].js +++ b/frontend/pages/provider/[provider].js @@ -9,7 +9,7 @@ import ReactMarkdown from 'react-markdown'; export default function Provider() { const providerName = useRouter().query.provider; const docs = useSWR('docs/provider/'+providerName, async () => (await axios.get("https://raw.githubusercontent.com/Josh-XT/Agent-LLM/main/docs/providers/"+providerName.toUpperCase()+".md")).data); - const providers = useSWR('provider', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/provider`)).data.providers); + const providers = useSWR('provider', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/provider`)).data.providers); return ( {data} diff --git a/frontend/pages/provider/index.js b/frontend/pages/provider/index.js index 1b7006dae356..29ec6b939296 100644 --- a/frontend/pages/provider/index.js +++ b/frontend/pages/provider/index.js @@ -7,7 +7,7 @@ import DoubleSidedMenu from '@/components/content/DoubleSidedMenu'; import ProviderList from '@/components/provider/ProviderList'; export default function Home() { const docs = useSWR('docs/prompt', async () => (await axios.get("https://raw.githubusercontent.com/Josh-XT/Agent-LLM/main/docs/concepts/PROVIDER.md")).data); - const providers = useSWR('provider', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:5000'}/api/provider`)).data.providers); + const providers = useSWR('provider', async () => (await axios.get(`${process.env.NEXT_PUBLIC_API_URI ?? 'http://localhost:7437'}/api/provider`)).data.providers); return ( {data} diff --git a/notebook.ipynb b/notebook.ipynb index 47487b1e24ed..30d3462dfdc8 100644 --- a/notebook.ipynb +++ b/notebook.ipynb @@ -19,7 +19,7 @@ "import requests\n", "from pprint import pprint\n", "\n", - "base_uri = \"http://localhost:5000\"" + "base_uri = \"http://localhost:7437\"" ] }, { diff --git a/notebooks/bard.ipynb b/notebooks/bard.ipynb index 210c9e49c375..31a33623ed45 100644 --- a/notebooks/bard.ipynb +++ b/notebooks/bard.ipynb @@ -112,9 +112,9 @@ "## Accessing Agent-LLM\n", "Web Interface: http://localhost\n", "\n", - "Redoc: http://localhost:5000/redoc\n", + "Redoc: http://localhost:7437/redoc\n", "\n", - "Swagger: http://localhost:5000/docs" + "Swagger: http://localhost:7437/docs" ] } ], diff --git a/notebooks/chatgpt.ipynb b/notebooks/chatgpt.ipynb index ca54187ded4e..869410f88d1b 100644 --- a/notebooks/chatgpt.ipynb +++ b/notebooks/chatgpt.ipynb @@ -111,9 +111,9 @@ "## Accessing Agent-LLM\n", "Web Interface: http://localhost\n", "\n", - "Redoc: http://localhost:5000/redoc\n", + "Redoc: http://localhost:7437/redoc\n", "\n", - "Swagger: http://localhost:5000/docs" + "Swagger: http://localhost:7437/docs" ] } ], diff --git a/notebooks/llamacpp.ipynb b/notebooks/llamacpp.ipynb index 65ca6597f06a..a275aefa27fa 100644 --- a/notebooks/llamacpp.ipynb +++ b/notebooks/llamacpp.ipynb @@ -114,9 +114,9 @@ "## Accessing Agent-LLM\n", "Web Interface: http://localhost\n", "\n", - "Redoc: http://localhost:5000/redoc\n", + "Redoc: http://localhost:7437/redoc\n", "\n", - "Swagger: http://localhost:5000/docs" + "Swagger: http://localhost:7437/docs" ] } ], diff --git a/notebooks/oobabooga.ipynb b/notebooks/oobabooga.ipynb index 28c6d1b77911..3c41701c24ac 100644 --- a/notebooks/oobabooga.ipynb +++ b/notebooks/oobabooga.ipynb @@ -137,7 +137,22 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Access at http://localhost:7860/?__theme=dark once running." + "Access at http://localhost:7860/?__theme=dark once running.\n", + "\n", + "## Navigate to Agent-LLM" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "vscode": { + "languageId": "shellscript" + } + }, + "outputs": [], + "source": [ + "cd ../Agent-LLM" ] }, { @@ -145,7 +160,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Agent-LLM\n", "Create your `.env` below. Modify if necessary." ] }, @@ -158,7 +172,7 @@ "# Define variables.\n", "AI_PROVIDER = \"oobabooga\"\n", "AI_MODEL = \"vicuna\"\n", - "AI_PROVIDER_URI = \"http://localhost:7860\"\n", + "AI_PROVIDER_URI = \"http://localhost:5000\"\n", "AI_TEMPERATURE = 0.2\n", "MAX_TOKENS = 2096\n", "\n", @@ -171,6 +185,14 @@ " f.write(f'MAX_TOKENS={MAX_TOKENS}\\n')" ] }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start the back end application for Agent-LLM" + ] + }, { "cell_type": "code", "execution_count": null, @@ -182,7 +204,30 @@ "outputs": [], "source": [ "cd Agent-LLM\n", - "docker-compose up --build -d" + "python app.py" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Navigate to the `frontend` folder to install dependencies and start the `NextJS` front end for Agent-LLM." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "vscode": { + "languageId": "shellscript" + } + }, + "outputs": [], + "source": [ + "cd frontend\n", + "npm install\n", + "npm run build\n", + "npm start" ] }, { @@ -190,7 +235,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Navigate to http://localhost for Agent-LLM" + "## Accessing Agent-LLM\n", + "Web Interface: http://localhost\n", + "\n", + "Redoc: http://localhost:7437/redoc\n", + "\n", + "Swagger: http://localhost:7437/docs" ] } ], diff --git a/notebooks/openai.ipynb b/notebooks/openai.ipynb index 918ebda4a7b0..f0023c47e1fc 100644 --- a/notebooks/openai.ipynb +++ b/notebooks/openai.ipynb @@ -83,9 +83,9 @@ "## Accessing Agent-LLM\n", "Web Interface: http://localhost\n", "\n", - "Redoc: http://localhost:5000/redoc\n", + "Redoc: http://localhost:7437/redoc\n", "\n", - "Swagger: http://localhost:5000/docs" + "Swagger: http://localhost:7437/docs" ] } ],