diff --git a/.gitignore b/.gitignore index 0d2b1af..c6e133e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ test-proj/ui/node_modules test-proj/ui/pnpm-lock.yaml ui/pnpm-lock.yaml ui/package-lock.json -test-proj/ui/package-lock.json \ No newline at end of file +test-proj/ui/package-lock.json +workflows.db diff --git a/.gitignore.jinja b/.gitignore.jinja index 3b72af0..81bf373 100644 --- a/.gitignore.jinja +++ b/.gitignore.jinja @@ -1,2 +1,3 @@ .env __pycache__ +workflows.db diff --git a/pyproject.toml.jinja b/pyproject.toml.jinja index a09828e..a256377 100644 --- a/pyproject.toml.jinja +++ b/pyproject.toml.jinja @@ -5,8 +5,8 @@ description = "Extracts data" readme = "README.md" requires-python = ">=3.12" dependencies = [ - "llama-cloud-services>=0.6.57", - "llama-index-workflows>=2.0.0,<3.0.0", + "llama-cloud-services>=0.6.59", + "llama-index-workflows>=2.2.0,<3.0.0", "python-dotenv>=1.1.0", "jsonref>=1.1.0", "click>=8.2.1", @@ -24,7 +24,7 @@ dev = [ "ty>=0.0.1a16", "pytest>=8.4.1", "hatch>=1.14.1", - "llamactl>=0.3.0a9" + "llamactl>=0.3.0" ] [build-system] diff --git a/test-proj/.copier-answers.yml b/test-proj/.copier-answers.yml index 66c1bc9..87585d9 100644 --- a/test-proj/.copier-answers.yml +++ b/test-proj/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY -_commit: e8edd1d +_commit: c778ba5 _src_path: . project_name: test-proj project_title: Test Proj diff --git a/test-proj/.gitignore b/test-proj/.gitignore index 3b72af0..81bf373 100644 --- a/test-proj/.gitignore +++ b/test-proj/.gitignore @@ -1,2 +1,3 @@ .env __pycache__ +workflows.db diff --git a/test-proj/pyproject.toml b/test-proj/pyproject.toml index 198d146..be7d86b 100644 --- a/test-proj/pyproject.toml +++ b/test-proj/pyproject.toml @@ -5,8 +5,8 @@ description = "Extracts data" readme = "README.md" requires-python = ">=3.12" dependencies = [ - "llama-cloud-services>=0.6.57", - "llama-index-workflows>=2.0.0,<3.0.0", + "llama-cloud-services>=0.6.59", + "llama-index-workflows>=2.2.0,<3.0.0", "python-dotenv>=1.1.0", "jsonref>=1.1.0", "click>=8.2.1", @@ -24,7 +24,7 @@ dev = [ "ty>=0.0.1a16", "pytest>=8.4.1", "hatch>=1.14.1", - "llamactl>=0.3.0a9" + "llamactl>=0.3.0" ] [build-system] diff --git a/test-proj/ui/package.json b/test-proj/ui/package.json index 262be56..753f2f7 100644 --- a/test-proj/ui/package.json +++ b/test-proj/ui/package.json @@ -16,7 +16,7 @@ "dependencies": { "@babel/runtime": "^7.27.6", "@lezer/highlight": "^1.2.1", - "@llamaindex/ui": "^0.5.7", + "@llamaindex/ui": "^1.0.2", "@radix-ui/themes": "^3.2.1", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", diff --git a/test-proj/ui/src/App.tsx b/test-proj/ui/src/App.tsx index 48ef195..e326fe5 100644 --- a/test-proj/ui/src/App.tsx +++ b/test-proj/ui/src/App.tsx @@ -12,7 +12,6 @@ import { Link } from "react-router-dom"; import { Toaster } from "@llamaindex/ui"; import { useToolbar, ToolbarProvider } from "@/lib/ToolbarContext"; import { clients } from "@/lib/client"; -import { AGENT_NAME } from "@/lib/config"; // Import pages import HomePage from "./pages/HomePage"; @@ -21,7 +20,7 @@ import ItemPage from "./pages/ItemPage"; export default function App() { return ( - +
diff --git a/test-proj/ui/src/lib/client.ts b/test-proj/ui/src/lib/client.ts index 21f2e86..82550dc 100644 --- a/test-proj/ui/src/lib/client.ts +++ b/test-proj/ui/src/lib/client.ts @@ -1,13 +1,12 @@ import { MySchema } from "@/schemas/MySchema"; import { ExtractedData } from "llama-cloud-services/beta/agent"; -import { ApiClients } from "@llamaindex/ui"; import { - createCloudAgentClient, - createLlamaDeployClient, - createLlamaDeployConfig, - cloudApiClient, + ApiClients, + createWorkflowClient, + createWorkflowConfig, } from "@llamaindex/ui"; -import { EXTRACTED_DATA_COLLECTION } from "./config"; +import { createCloudAgentClient, cloudApiClient } from "@llamaindex/ui"; +import { AGENT_NAME, EXTRACTED_DATA_COLLECTION } from "./config"; const platformToken = import.meta.env.VITE_LLAMA_CLOUD_API_KEY; const apiBaseUrl = import.meta.env.VITE_LLAMA_CLOUD_BASE_URL; @@ -31,8 +30,14 @@ const agentClient = createCloudAgentClient>({ collection: EXTRACTED_DATA_COLLECTION, }); +const workflowsClient = createWorkflowClient( + createWorkflowConfig({ + baseUrl: `/deployments/${AGENT_NAME}/`, + }), +); + const clients: ApiClients = { - llamaDeployClient: createLlamaDeployClient(createLlamaDeployConfig()), + workflowsClient: workflowsClient, cloudApiClient: cloudApiClient, agentDataClient: agentClient, }; diff --git a/test-proj/ui/src/pages/HomePage.tsx b/test-proj/ui/src/pages/HomePage.tsx index 743ab05..e1ba18f 100644 --- a/test-proj/ui/src/pages/HomePage.tsx +++ b/test-proj/ui/src/pages/HomePage.tsx @@ -11,8 +11,6 @@ import { useNavigate } from "react-router-dom"; import { agentClient } from "@/lib/client"; import { useEffect, useState } from "react"; -const deployment = import.meta.env.VITE_LLAMA_DEPLOY_DEPLOYMENT_NAME; - export default function HomePage() { const { taskKey } = taskCompletedState(); return ; @@ -63,8 +61,7 @@ function TaskList() {
{ return { file_id: files[0].fileId, diff --git a/ui/package.json.jinja b/ui/package.json.jinja index d35674b..5b5b9fb 100644 --- a/ui/package.json.jinja +++ b/ui/package.json.jinja @@ -16,7 +16,7 @@ "dependencies": { "@babel/runtime": "^7.27.6", "@lezer/highlight": "^1.2.1", - "@llamaindex/ui": "^0.5.7", + "@llamaindex/ui": "^1.0.2", "@radix-ui/themes": "^3.2.1", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 48ef195..e326fe5 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -12,7 +12,6 @@ import { Link } from "react-router-dom"; import { Toaster } from "@llamaindex/ui"; import { useToolbar, ToolbarProvider } from "@/lib/ToolbarContext"; import { clients } from "@/lib/client"; -import { AGENT_NAME } from "@/lib/config"; // Import pages import HomePage from "./pages/HomePage"; @@ -21,7 +20,7 @@ import ItemPage from "./pages/ItemPage"; export default function App() { return ( - +
diff --git a/ui/src/lib/client.ts b/ui/src/lib/client.ts index 21f2e86..82550dc 100644 --- a/ui/src/lib/client.ts +++ b/ui/src/lib/client.ts @@ -1,13 +1,12 @@ import { MySchema } from "@/schemas/MySchema"; import { ExtractedData } from "llama-cloud-services/beta/agent"; -import { ApiClients } from "@llamaindex/ui"; import { - createCloudAgentClient, - createLlamaDeployClient, - createLlamaDeployConfig, - cloudApiClient, + ApiClients, + createWorkflowClient, + createWorkflowConfig, } from "@llamaindex/ui"; -import { EXTRACTED_DATA_COLLECTION } from "./config"; +import { createCloudAgentClient, cloudApiClient } from "@llamaindex/ui"; +import { AGENT_NAME, EXTRACTED_DATA_COLLECTION } from "./config"; const platformToken = import.meta.env.VITE_LLAMA_CLOUD_API_KEY; const apiBaseUrl = import.meta.env.VITE_LLAMA_CLOUD_BASE_URL; @@ -31,8 +30,14 @@ const agentClient = createCloudAgentClient>({ collection: EXTRACTED_DATA_COLLECTION, }); +const workflowsClient = createWorkflowClient( + createWorkflowConfig({ + baseUrl: `/deployments/${AGENT_NAME}/`, + }), +); + const clients: ApiClients = { - llamaDeployClient: createLlamaDeployClient(createLlamaDeployConfig()), + workflowsClient: workflowsClient, cloudApiClient: cloudApiClient, agentDataClient: agentClient, }; diff --git a/ui/src/pages/HomePage.tsx b/ui/src/pages/HomePage.tsx index 743ab05..e1ba18f 100644 --- a/ui/src/pages/HomePage.tsx +++ b/ui/src/pages/HomePage.tsx @@ -11,8 +11,6 @@ import { useNavigate } from "react-router-dom"; import { agentClient } from "@/lib/client"; import { useEffect, useState } from "react"; -const deployment = import.meta.env.VITE_LLAMA_DEPLOY_DEPLOYMENT_NAME; - export default function HomePage() { const { taskKey } = taskCompletedState(); return ; @@ -63,8 +61,7 @@ function TaskList() {
{ return { file_id: files[0].fileId,