From c761e29c8dab6ba51a73433436a587861b99b29a Mon Sep 17 00:00:00 2001 From: Gabe Hamilton Date: Thu, 11 Apr 2024 17:15:51 -0600 Subject: [PATCH] Moved to AI folder, standard user account. --- .github/workflows/deploy-dev-testnet.yml | 6 +++--- .github/workflows/deploy-prod-mainnet.yml | 6 +++--- .github/workflows/deploy-prod-testnet.yml | 6 +++--- README.md | 6 +----- nexus/components/src/{ => AI}/Agent/AgentBuilder.jsx | 0 nexus/components/src/{ => AI}/Agent/AgentCard.jsx | 4 ++-- nexus/components/src/{ => AI}/Agent/AgentChat.jsx | 4 ++-- nexus/components/src/AI/Agent/AgentCustomizer.jsx | 10 ++++++++++ nexus/components/src/{ => AI}/Agent/AgentDetails.jsx | 6 +++--- .../src/{ => AI}/Agent/AgentEntityConfig.jsx | 6 +++--- nexus/components/src/{ => AI}/Agent/AgentSummary.jsx | 2 +- nexus/components/src/AI/Agent/LangChain.jsx | 4 ++++ nexus/components/src/{ => AI}/Dashboard.jsx | 0 nexus/components/src/{ => AI}/HeaderText.jsx | 0 nexus/components/src/{ => AI}/Nexus.jsx | 4 ++-- nexus/components/src/{ => AI}/Overview.jsx | 2 +- nexus/components/src/{ => AI}/Placeholder.jsx | 4 ++-- nexus/components/src/{ => AI}/Schema/Agent.jsx | 0 .../src/{ => AI}/Schema/AlignmentDataset.jsx | 0 nexus/components/src/{ => AI}/Schema/ModelName.jsx | 0 nexus/components/src/{ => AI}/Schema/Nexus.jsx | 10 +++++----- 21 files changed, 45 insertions(+), 35 deletions(-) rename nexus/components/src/{ => AI}/Agent/AgentBuilder.jsx (100%) rename nexus/components/src/{ => AI}/Agent/AgentCard.jsx (97%) rename nexus/components/src/{ => AI}/Agent/AgentChat.jsx (99%) create mode 100644 nexus/components/src/AI/Agent/AgentCustomizer.jsx rename nexus/components/src/{ => AI}/Agent/AgentDetails.jsx (81%) rename nexus/components/src/{ => AI}/Agent/AgentEntityConfig.jsx (81%) rename nexus/components/src/{ => AI}/Agent/AgentSummary.jsx (99%) create mode 100644 nexus/components/src/AI/Agent/LangChain.jsx rename nexus/components/src/{ => AI}/Dashboard.jsx (100%) rename nexus/components/src/{ => AI}/HeaderText.jsx (100%) rename nexus/components/src/{ => AI}/Nexus.jsx (96%) rename nexus/components/src/{ => AI}/Overview.jsx (99%) rename nexus/components/src/{ => AI}/Placeholder.jsx (98%) rename nexus/components/src/{ => AI}/Schema/Agent.jsx (100%) rename nexus/components/src/{ => AI}/Schema/AlignmentDataset.jsx (100%) rename nexus/components/src/{ => AI}/Schema/ModelName.jsx (100%) rename nexus/components/src/{ => AI}/Schema/Nexus.jsx (95%) diff --git a/.github/workflows/deploy-dev-testnet.yml b/.github/workflows/deploy-dev-testnet.yml index a9a654a..861641b 100644 --- a/.github/workflows/deploy-dev-testnet.yml +++ b/.github/workflows/deploy-dev-testnet.yml @@ -7,9 +7,9 @@ jobs: runs-on: ubuntu-latest name: Deploy widgets to agiguild-dev.testnet env: - NEAR_SOCIAL_ACCOUNT_ID: ${{ vars.AGI_GUILD_TESTNET_DEV_ACCOUNT_ID }} - NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY: ${{ vars.AGI_GUILD_TESTNET_DEV_ACCOUNT_PUBLIC_KEY }} - NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY: ${{ secrets.AGI_GUILD_TESTNET_DEV_ACCOUNT_PRIVATE_KEY }} + NEAR_SOCIAL_ACCOUNT_ID: ${{ vars.NEAR_SOCIAL_TESTNET_DEV_ACCOUNT_ID }} + NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY: ${{ vars.NEAR_SOCIAL_TESTNET_DEV_ACCOUNT_PUBLIC_KEY }} + NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY: ${{ secrets.NEAR_SOCIAL_TESTNET_DEV_ACCOUNT_PRIVATE_KEY }} steps: - name: Checkout repository diff --git a/.github/workflows/deploy-prod-mainnet.yml b/.github/workflows/deploy-prod-mainnet.yml index 216ae79..fcf31d7 100644 --- a/.github/workflows/deploy-prod-mainnet.yml +++ b/.github/workflows/deploy-prod-mainnet.yml @@ -7,9 +7,9 @@ jobs: runs-on: ubuntu-latest name: Deploy widgets to agiguild.near (mainnet) env: - NEAR_SOCIAL_ACCOUNT_ID: ${{ vars.AGI_GUILD_ACCOUNT_ID }} - NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY: ${{ vars.AGI_GUILD_ACCOUNT_PUBLIC_KEY }} - NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY: ${{ secrets.AGI_GUILD_ACCOUNT_PRIVATE_KEY }} + NEAR_SOCIAL_ACCOUNT_ID: ${{ vars.NEAR_SOCIAL_ACCOUNT_ID }} + NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY: ${{ vars.NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY }} + NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY: ${{ secrets.NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY }} steps: - name: Checkout repository diff --git a/.github/workflows/deploy-prod-testnet.yml b/.github/workflows/deploy-prod-testnet.yml index 1cfcff6..0e0bd81 100644 --- a/.github/workflows/deploy-prod-testnet.yml +++ b/.github/workflows/deploy-prod-testnet.yml @@ -7,9 +7,9 @@ jobs: runs-on: ubuntu-latest name: Deploy widgets to agiguild.testnet env: - NEAR_SOCIAL_ACCOUNT_ID: ${{ vars.AGI_GUILD_TESTNET_ACCOUNT_ID }} - NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY: ${{ vars.AGI_GUILD_TESTNET_ACCOUNT_PUBLIC_KEY }} - NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY: ${{ secrets.AGI_GUILD_TESTNET_ACCOUNT_PRIVATE_KEY }} + NEAR_SOCIAL_ACCOUNT_ID: ${{ vars.NEAR_SOCIAL_TESTNET_ACCOUNT_ID }} + NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY: ${{ vars.NEAR_SOCIAL_TESTNET_ACCOUNT_PUBLIC_KEY }} + NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY: ${{ secrets.NEAR_SOCIAL_TESTNET_ACCOUNT_PRIVATE_KEY }} steps: - name: Checkout repository diff --git a/README.md b/README.md index 2c881f4..0d608da 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,7 @@ These may be Near specific, multi-chain using Near chain abstraction, or impleme Projects may be spun out into their own repositories as they mature. ## Areas - * ./nexus/components - AGI Guild resource Nexus, BOS component implementation + * ./nexus/components - NEAR AI resource Nexus, React on Chain component implementation * ./nexus/framework - Framework of NEAR Protocol Capabilities for use by AI Agents * [./nexus/framework/trust](nexus/framework/trust) - Trust and Integrity Framework * [./nexus/examples](nexus/examples) - Example agents that use Agent Framework capabilities - - - * inference - Provable Decentralized Inference - diff --git a/nexus/components/src/Agent/AgentBuilder.jsx b/nexus/components/src/AI/Agent/AgentBuilder.jsx similarity index 100% rename from nexus/components/src/Agent/AgentBuilder.jsx rename to nexus/components/src/AI/Agent/AgentBuilder.jsx diff --git a/nexus/components/src/Agent/AgentCard.jsx b/nexus/components/src/AI/Agent/AgentCard.jsx similarity index 97% rename from nexus/components/src/Agent/AgentCard.jsx rename to nexus/components/src/AI/Agent/AgentCard.jsx index b674a1a..1a4612f 100644 --- a/nexus/components/src/Agent/AgentCard.jsx +++ b/nexus/components/src/AI/Agent/AgentCard.jsx @@ -65,7 +65,7 @@ const AgentCard = ({ item, editFunction }) => { const { accountId, name, displayName, prompt, logoUrl } = item; const agentComponent = item.component ? item.component - : `${REPL_AGIGUILD}/widget/Agent.AgentChat`; + : `${REPL_ACCOUNT}/widget/Agent.AgentChat`; const imageUrl = logoUrl ? logoUrl : "https://ipfs.near.social/ipfs/bafkreibysr2mkwhb4j36h2t7mqwhynqdy4vzjfygfkfg65kuspd2bawauu"; @@ -74,7 +74,7 @@ const AgentCard = ({ item, editFunction }) => { params: { src: `${accountId}/agent/${name}` }, }); const detailsLink = href({ - widgetSrc: `${REPL_AGIGUILD}/widget/Agent.AgentDetails`, + widgetSrc: `${REPL_ACCOUNT}/widget/Agent.AgentDetails`, params: { src: `${accountId}/agent/${name}`, schemaFile, diff --git a/nexus/components/src/Agent/AgentChat.jsx b/nexus/components/src/AI/Agent/AgentChat.jsx similarity index 99% rename from nexus/components/src/Agent/AgentChat.jsx rename to nexus/components/src/AI/Agent/AgentChat.jsx index 89f7af9..2e25248 100644 --- a/nexus/components/src/Agent/AgentChat.jsx +++ b/nexus/components/src/AI/Agent/AgentChat.jsx @@ -25,7 +25,7 @@ const agent = { accountId, name: agentName, ...data }; if (!data) return "Loading..."; const listLink = href({ - widgetSrc: `${REPL_AGIGUILD}/widget/Nexus`, + widgetSrc: `${REPL_ACCOUNT}/widget/Nexus`, }); const [settingsOpen, setSettingsOpen] = useState(false); @@ -397,7 +397,7 @@ return (
{ - if (component === `agiguild.near/widget/Agent.AgentChat`) { + if (component === `near/widget/Agent.AgentChat`) { return "Chat"; } return ( @@ -19,7 +19,7 @@ const customComponentLabel = (component) => { const additionalTabs = (entity) => { const agentComponent = entity.component ? entity.component - : `${REPL_AGIGUILD}/widget/Agent.AgentChat`; + : `${REPL_ACCOUNT}/widget/Agent.AgentChat`; return { name: customComponentLabel(agentComponent), diff --git a/nexus/components/src/Agent/AgentEntityConfig.jsx b/nexus/components/src/AI/Agent/AgentEntityConfig.jsx similarity index 81% rename from nexus/components/src/Agent/AgentEntityConfig.jsx rename to nexus/components/src/AI/Agent/AgentEntityConfig.jsx index 681add8..2886118 100644 --- a/nexus/components/src/Agent/AgentEntityConfig.jsx +++ b/nexus/components/src/AI/Agent/AgentEntityConfig.jsx @@ -11,13 +11,13 @@ const renderItem = (item, editFunction) => { delete flatItem.attributes; return ( ); @@ -29,7 +29,7 @@ return ( namespace: "near", entityType: "agent", title: "Agent", - schemaFile: "${REPL_AGIGUILD}/widget/Schema.Agent", + schemaFile: "${REPL_ACCOUNT}/widget/Schema.Agent", renderItem, }} /> diff --git a/nexus/components/src/Agent/AgentSummary.jsx b/nexus/components/src/AI/Agent/AgentSummary.jsx similarity index 99% rename from nexus/components/src/Agent/AgentSummary.jsx rename to nexus/components/src/AI/Agent/AgentSummary.jsx index 53d7b5a..c3b7846 100644 --- a/nexus/components/src/Agent/AgentSummary.jsx +++ b/nexus/components/src/AI/Agent/AgentSummary.jsx @@ -10,7 +10,7 @@ const { accountId, name, displayName, prompt, logoUrl, tags, component } = const agentComponent = item.component ? item.component - : `${REPL_AGIGUILD}/widget/Agent.AgentChat`; + : `${REPL_ACCOUNT}/widget/Agent.AgentChat`; const chatLink = href({ widgetSrc: agentComponent, params: { src: `${accountId}/agent/${name}` }, diff --git a/nexus/components/src/AI/Agent/LangChain.jsx b/nexus/components/src/AI/Agent/LangChain.jsx new file mode 100644 index 0000000..505fcff --- /dev/null +++ b/nexus/components/src/AI/Agent/LangChain.jsx @@ -0,0 +1,4 @@ +const src = ` +import { OpenAI } from "@langchain/openai"; + +`; diff --git a/nexus/components/src/Dashboard.jsx b/nexus/components/src/AI/Dashboard.jsx similarity index 100% rename from nexus/components/src/Dashboard.jsx rename to nexus/components/src/AI/Dashboard.jsx diff --git a/nexus/components/src/HeaderText.jsx b/nexus/components/src/AI/HeaderText.jsx similarity index 100% rename from nexus/components/src/HeaderText.jsx rename to nexus/components/src/AI/HeaderText.jsx diff --git a/nexus/components/src/Nexus.jsx b/nexus/components/src/AI/Nexus.jsx similarity index 96% rename from nexus/components/src/Nexus.jsx rename to nexus/components/src/AI/Nexus.jsx index 31a9f7a..18fe055 100644 --- a/nexus/components/src/Nexus.jsx +++ b/nexus/components/src/AI/Nexus.jsx @@ -10,7 +10,7 @@ const Wrapper = styled.div` flex-direction: column; } `; -const { schema } = VM.require(`${REPL_AGIGUILD}/widget/Schema.Nexus`); +const { schema } = VM.require(`${REPL_ACCOUNT}/widget/Schema.Nexus`); if (!schema) { return <>; } @@ -56,7 +56,7 @@ const content = { overview: () => { return ( ); diff --git a/nexus/components/src/Overview.jsx b/nexus/components/src/AI/Overview.jsx similarity index 99% rename from nexus/components/src/Overview.jsx rename to nexus/components/src/AI/Overview.jsx index a71ffd8..79cb0ee 100644 --- a/nexus/components/src/Overview.jsx +++ b/nexus/components/src/AI/Overview.jsx @@ -451,7 +451,7 @@ return (
diff --git a/nexus/components/src/Placeholder.jsx b/nexus/components/src/AI/Placeholder.jsx similarity index 98% rename from nexus/components/src/Placeholder.jsx rename to nexus/components/src/AI/Placeholder.jsx index 773613e..5ddd319 100644 --- a/nexus/components/src/Placeholder.jsx +++ b/nexus/components/src/AI/Placeholder.jsx @@ -34,7 +34,7 @@ const renderItem = (item, editFunction) => { const { accountId, name, displayName, logoUrl } = item; const itemComponent = item.component ? item.component - : `${REPL_AGIGUILD}/widget/Agent.AgentChat`; + : `${REPL_ACCOUNT}/widget/Agent.AgentChat`; const imageUrl = logoUrl ?? "https://ipfs.near.social/ipfs/bafkreibysr2mkwhb4j36h2t7mqwhynqdy4vzjfygfkfg65kuspd2bawauu"; @@ -43,7 +43,7 @@ const renderItem = (item, editFunction) => { params: { src: `${accountId}/agent/${name}` }, }); const detailsLink = href({ - widgetSrc: `${REPL_AGIGUILD}/widget/Agent.AgentDetails`, + widgetSrc: `${REPL_ACCOUNT}/widget/Agent.AgentDetails`, params: { src: `${accountId}/agent/${name}` }, }); diff --git a/nexus/components/src/Schema/Agent.jsx b/nexus/components/src/AI/Schema/Agent.jsx similarity index 100% rename from nexus/components/src/Schema/Agent.jsx rename to nexus/components/src/AI/Schema/Agent.jsx diff --git a/nexus/components/src/Schema/AlignmentDataset.jsx b/nexus/components/src/AI/Schema/AlignmentDataset.jsx similarity index 100% rename from nexus/components/src/Schema/AlignmentDataset.jsx rename to nexus/components/src/AI/Schema/AlignmentDataset.jsx diff --git a/nexus/components/src/Schema/ModelName.jsx b/nexus/components/src/AI/Schema/ModelName.jsx similarity index 100% rename from nexus/components/src/Schema/ModelName.jsx rename to nexus/components/src/AI/Schema/ModelName.jsx diff --git a/nexus/components/src/Schema/Nexus.jsx b/nexus/components/src/AI/Schema/Nexus.jsx similarity index 95% rename from nexus/components/src/Schema/Nexus.jsx rename to nexus/components/src/AI/Schema/Nexus.jsx index 6c518aa..39dccb1 100644 --- a/nexus/components/src/Schema/Nexus.jsx +++ b/nexus/components/src/AI/Schema/Nexus.jsx @@ -79,7 +79,7 @@ const schema = { namespace: "near", entityType: "alignmentDataset", title: "Alignment Datasets: RLHF, DPO", - schemaFile: "${REPL_AGIGUILD}/widget/Schema.AlignmentDataset", + schemaFile: "${REPL_ACCOUNT}/widget/Schema.AlignmentDataset", }} /> ), @@ -101,7 +101,7 @@ const schema = { props={{ namespace: "near", entityType: "modelProvider", - schemaFile: "${REPL_AGIGUILD}/widget/Schema.Provider", + schemaFile: "${REPL_ACCOUNT}/widget/Schema.Provider", }} /> ), @@ -117,7 +117,7 @@ const schema = { namespace: "near", entityType: "modelName", title: "Standard Model Names", - schemaFile: "${REPL_AGIGUILD}/widget/Schema.ModelName", + schemaFile: "${REPL_ACCOUNT}/widget/Schema.ModelName", }} /> ), @@ -149,7 +149,7 @@ const schema = { name: "Agents", value: "agents", content: ( - + ), icon: "ph ph-address-book", }, @@ -202,7 +202,7 @@ const schema = { value: "contracts", content: (