From e954e2cb44881144e06863bb3221962de1e452b6 Mon Sep 17 00:00:00 2001
From: Ryan Fox-Tyler <60440289+ryanfoxtyler@users.noreply.github.com>
Date: Fri, 4 Oct 2024 10:32:27 -0400
Subject: [PATCH 1/9] set up structure for Modus
---
community-and-support.mdx | 4 +
configure-environment.mdx | 4 +
create-project.mdx | 4 +
define-collections.mdx | 69 --------
define-models.mdx | 52 ------
deploy.mdx | 4 +-
getting-started-with-hyper-commerce.mdx | 10 +-
hosted-models.mdx | 4 +
hyp-cli.mdx | 4 +
integrate-api.mdx | 4 +
introduction.mdx | 2 +-
manifest.mdx | 19 ---
mint.json | 116 ++++++++-----
modify-organization.mdx | 4 +
modify-project.mdx | 4 +
modus/ai-enabled-apps.mdx | 4 +
define-schema.mdx => modus/api-generation.mdx | 2 +-
define-hosts.mdx => modus/app-manifest.mdx | 161 ++++++++++++++++--
modus/architecture.mdx | 4 +
modus/authentication.mdx | 4 +
modus/basic-functions.mdx | 4 +
modus/changelog.mdx | 4 +
modus/contributing.mdx | 4 +
modus/data-fetching.mdx | 4 +
modus/deploying.mdx | 4 +
modus/error-handling.mdx | 4 +
modus/model-invoking.mdx | 4 +
modus/modus-cli.mdx | 4 +
sdk/functions-sdk.mdx => modus/overview.mdx | 23 ++-
modus/project-structure.mdx | 4 +
modus/quickstart.mdx | 4 +
modus/roadmap.mdx | 4 +
{sdk => modus/sdk}/collections.mdx | 41 +++--
{sdk => modus/sdk}/console.mdx | 0
{sdk => modus/sdk}/dgraph.mdx | 10 +-
{sdk => modus/sdk}/graphql.mdx | 4 +-
{sdk => modus/sdk}/http.mdx | 2 +-
{sdk => modus/sdk}/models.mdx | 0
{sdk => modus/sdk}/postgresql.mdx | 8 +-
modus/search.mdx | 4 +
modus/testing.mdx | 4 +
modus/troubleshooting.mdx | 4 +
modus/upgrading.mdx | 4 +
...observability.mdx => observe-functions.mdx | 2 +-
quickstart.mdx | 6 +-
security.mdx | 4 +
user-management.mdx | 4 +
work-locally.mdx | 4 +
48 files changed, 401 insertions(+), 246 deletions(-)
create mode 100644 community-and-support.mdx
create mode 100644 configure-environment.mdx
create mode 100644 create-project.mdx
delete mode 100644 define-collections.mdx
delete mode 100644 define-models.mdx
create mode 100644 hosted-models.mdx
create mode 100644 hyp-cli.mdx
create mode 100644 integrate-api.mdx
delete mode 100644 manifest.mdx
create mode 100644 modify-organization.mdx
create mode 100644 modify-project.mdx
create mode 100644 modus/ai-enabled-apps.mdx
rename define-schema.mdx => modus/api-generation.mdx (98%)
rename define-hosts.mdx => modus/app-manifest.mdx (55%)
create mode 100644 modus/architecture.mdx
create mode 100644 modus/authentication.mdx
create mode 100644 modus/basic-functions.mdx
create mode 100644 modus/changelog.mdx
create mode 100644 modus/contributing.mdx
create mode 100644 modus/data-fetching.mdx
create mode 100644 modus/deploying.mdx
create mode 100644 modus/error-handling.mdx
create mode 100644 modus/model-invoking.mdx
create mode 100644 modus/modus-cli.mdx
rename sdk/functions-sdk.mdx => modus/overview.mdx (76%)
create mode 100644 modus/project-structure.mdx
create mode 100644 modus/quickstart.mdx
create mode 100644 modus/roadmap.mdx
rename {sdk => modus/sdk}/collections.mdx (93%)
rename {sdk => modus/sdk}/console.mdx (100%)
rename {sdk => modus/sdk}/dgraph.mdx (93%)
rename {sdk => modus/sdk}/graphql.mdx (97%)
rename {sdk => modus/sdk}/http.mdx (99%)
rename {sdk => modus/sdk}/models.mdx (100%)
rename {sdk => modus/sdk}/postgresql.mdx (96%)
create mode 100644 modus/search.mdx
create mode 100644 modus/testing.mdx
create mode 100644 modus/troubleshooting.mdx
create mode 100644 modus/upgrading.mdx
rename function-observability.mdx => observe-functions.mdx (92%)
create mode 100644 security.mdx
create mode 100644 user-management.mdx
create mode 100644 work-locally.mdx
diff --git a/community-and-support.mdx b/community-and-support.mdx
new file mode 100644
index 00000000..c5f0e602
--- /dev/null
+++ b/community-and-support.mdx
@@ -0,0 +1,4 @@
+---
+title: Community and Support
+description: ""
+---
diff --git a/configure-environment.mdx b/configure-environment.mdx
new file mode 100644
index 00000000..239a546f
--- /dev/null
+++ b/configure-environment.mdx
@@ -0,0 +1,4 @@
+---
+title: Configure Environnment
+description: ""
+---
diff --git a/create-project.mdx b/create-project.mdx
new file mode 100644
index 00000000..a1f928d5
--- /dev/null
+++ b/create-project.mdx
@@ -0,0 +1,4 @@
+---
+title: Create Project
+description: ""
+---
diff --git a/define-collections.mdx b/define-collections.mdx
deleted file mode 100644
index 83f4b6b1..00000000
--- a/define-collections.mdx
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: Define Collections
-description: "Enable natural language search"
----
-
-Collections are a key integration aspect with [models](/define-models) to create smart, searchable text.
-The `collections` object in the [project manifest](/manifest) allows you to define groupings of text and functions to embed inserted text with.
-
-```json hypermode.json
-{
- "collections": {
- // This defines a collection of products, having two search methods.
- "myProducts": {
- "searchMethods": {
- "searchMethod1": {
- // The embedder is the name of the function that will be used to generate vector embeddings.
- // By default, it uses a sequential index.
- "embedder": "embed"
- },
-
- // This is an example of a second search method.
- // It could use a different embedder or index type, if desired.
- "searchMethod2": {
- "embedder": "embed",
- "index": {
- "type": "sequential"
- }
- }
- }
- }
- }
-}
-```
-
-Each collection requires a unique name, specified as a key, containing only alphanumeric characters and hyphens.
-
-## Properties
-
-
- If provided, adds an index on top of the collection. Each key-value pair is a
- search method and values.
-
- - `embedder`: An exported function name used by the search method to
- embed text in the collection. Function must have a call signature with input `string[]` and return type `f32[][]`.
-
- This example specifies a `searchMethod` with an embedder named `embed`
- ```json
- "searchMethod1": {
- "embedder": "embed"
- }
- ```
-
-
- - `index`: If provided, describes the index mechanism used by the search method.
- _By default, set to sequential indexing._
- - `type`: Specifies the type of the index. For example, "sequential".
-
- This example specifies a `searchMethod` with an embedder named `embed` and an index with type `sequential`
- ```json
- "searchMethod1": {
- "embedder": "embed"
- "index": {
- "type": "sequential"
- }
- }
- ```
-
-
-
diff --git a/define-models.mdx b/define-models.mdx
deleted file mode 100644
index b1b4e323..00000000
--- a/define-models.mdx
+++ /dev/null
@@ -1,52 +0,0 @@
----
-title: Define Models
-description: "Try a new model with a few lines of code"
----
-
-AI models are a core resource for inferencing.
-The `models` object in the [project manifest](/manifest) allows you to easily define models, whether hosted by Hypermode or another host.
-
-```json hypermode.json
-{
- "models": {
- "sentiment-classifier": {
- "task": "classification",
- "sourceModel": "distilbert/distilbert-base-uncased-finetuned-sst-2-english",
- "provider": "hugging-face",
- "host": "hypermode"
- }
- }
-}
-```
-
-Each model requires a unique name, specified as a key, containing only alphanumeric characters and hyphens.
-
-## Properties
-
-
- Training intent of the model. Currently, must be one of: `classification`,
- `embedding`, or `generation`.
-
-
-
- Original relative path of the model within the provider's repository.
-
-
-
- Organization or directory that provided the source model, such as
- `hugging-face` or `openai`.
-
-
-
- Host for the model instance.
-
-- Specify `"hypermode"` for models that are automatically deployed by Hypermode.
-- Otherwise, specify a name that matches a host defined in the [`hosts`](/define-hosts) section of the manifest.
-
-
-
-## Auto-deployed models
-
-When using `hugging-face` as the `provider` and `hypermode` as the `host`, Hypermode automatically deploys a dedicated
-instance of the defined `sourceModel` when deploying your project. Your project's functions securely connect to the
-hosted model, with no further configuration required.
diff --git a/deploy.mdx b/deploy.mdx
index c38e509c..51272b51 100644
--- a/deploy.mdx
+++ b/deploy.mdx
@@ -3,7 +3,7 @@ title: Deploy Project
description: "Deploying AI features is simple"
---
-Hypermode leverages a native GitHub integration for the deployment of Hypermode projects. The deployment includes both the project's [manifest](/manifest) and functions.
+Hypermode leverages a native GitHub integration for the deployment of Hypermode projects. The deployment includes both the project's [manifest](/modus/app-manifest) and functions.
Preview environments for live validation of pull requests are in development.
@@ -17,7 +17,7 @@ All templates include a GitHub Action to build your project's functions. On succ
On successful build of your project or a change to your manifest in your connected GitHub repository, Hypermode automatically deploys your project changes.
-For [auto-deployed models](/define-models#auto-deployed-models), Hypermode deploys a dedicated instance of the model.
+For auto-deployed models](/modus/app-manifest#auto-deployed-models), Hypermode deploys a dedicated instance of the model.
## Query
diff --git a/getting-started-with-hyper-commerce.mdx b/getting-started-with-hyper-commerce.mdx
index 0f7d560c..027bef0c 100644
--- a/getting-started-with-hyper-commerce.mdx
+++ b/getting-started-with-hyper-commerce.mdx
@@ -7,7 +7,7 @@ This guide walks you through getting started instantly with Hypermode using the
## What's Hypermode?
-[Hypermode](/introduction) is framework designed to simplify the development and deployment of AI features and assistants. With its [Functions SDK](/sdk/functions-sdk) and runtime, developers can quickly deploy intelligent features into production without the need for extensive data wrangling. Hypermode supports rapid iteration, allowing you to start with a large language model and later fine-tune smaller, open source models. Its production-ready GraphQL API auto-generates and enables seamless integration. Hypermode is ideal for developers looking to quickly prototype and evolve AI capabilities.
+[Hypermode](/introduction) is framework designed to simplify the development and deployment of AI features and assistants. With its [Functions SDK](/modus) and runtime, developers can quickly deploy intelligent features into production without the need for extensive data wrangling. Hypermode supports rapid iteration, allowing you to start with a large language model and later fine-tune smaller, open source models. Its production-ready GraphQL API auto-generates and enables seamless integration. Hypermode is ideal for developers looking to quickly prototype and evolve AI capabilities.
## Quickstart
@@ -84,10 +84,10 @@ In the Hypermode console, you’ll see several key components of your project:
/>
-- **[Functions](/sdk/functions-sdk):** These are serverless functions written in AssemblyScript (a TypeScript-like language) that are automatically exposed as GraphQL APIs. Once deployed, you can query these functions within your app.
-- **[Collections](/sdk/collections):** Hypermode offers built-in key-value storage, known as collections, with support for vector embeddings. This allows you to store and retrieve data efficiently, without requiring a database for basic use cases.
-- **[Models](/sdk/models):** This section represents the AI models defined for your project. These models handle tasks like embedding text into vectors for search. Hypermode provides open source shared and dedicated model hosting for rapid experimentation. You can also connect to your preferred large language model, including OpenAI, Anthropic, and Gemini.
-- **[Hosts](/define-hosts#define-hosts):** You define all external connections from your functions as hosts, with the runtime denying all other egress for secure-by-default processing.
+- **[Functions](/modus):** These are serverless functions written in AssemblyScript (a TypeScript-like language) that are automatically exposed as GraphQL APIs. Once deployed, you can query these functions within your app.
+- **[Collections](/modus/sdk/collections):** Hypermode offers built-in key-value storage, known as collections, with support for vector embeddings. This allows you to store and retrieve data efficiently, without requiring a database for basic use cases.
+- **[Models](/modus/sdk/models):** This section represents the AI models defined for your project. These models handle tasks like embedding text into vectors for search. Hypermode provides open source shared and dedicated model hosting for rapid experimentation. You can also connect to your preferred large language model, including OpenAI, Anthropic, and Gemini.
+- **[Hosts](/modus/app-manifest#hosts):** You define all external connections from your functions as hosts, with the runtime denying all other egress for secure-by-default processing.
- **Endpoint:** The GraphQL endpoint for your project, which you’ll use to interact with your APIs and query your data.
### Step 4: Querying your data
diff --git a/hosted-models.mdx b/hosted-models.mdx
new file mode 100644
index 00000000..c8db996e
--- /dev/null
+++ b/hosted-models.mdx
@@ -0,0 +1,4 @@
+---
+title: Hosted Models
+description: ""
+---
diff --git a/hyp-cli.mdx b/hyp-cli.mdx
new file mode 100644
index 00000000..ef6a029f
--- /dev/null
+++ b/hyp-cli.mdx
@@ -0,0 +1,4 @@
+---
+title: Hyp CLI
+description: ""
+---
diff --git a/integrate-api.mdx b/integrate-api.mdx
new file mode 100644
index 00000000..b614195a
--- /dev/null
+++ b/integrate-api.mdx
@@ -0,0 +1,4 @@
+---
+title: Integrate API
+description: ""
+---
diff --git a/introduction.mdx b/introduction.mdx
index da3aa396..331e67bd 100644
--- a/introduction.mdx
+++ b/introduction.mdx
@@ -4,7 +4,7 @@ description: "Welcome to Hypermode"
mode: "wide"
---
-Hypermode is a framework for building AI features and assistants for your applications. The easy-to-use [Functions SDK](/sdk/functions-sdk) combines with a powerful runtime to allow you to put your first features into production within hours, no data required.
+Hypermode is a framework for building AI features and assistants for your applications. The easy-to-use [Functions SDK](/modus) combines with a powerful runtime to allow you to put your first features into production within hours, no data required.
Don't stop there. Launch your project quickly with a large language model, while automatically building a training dataset to fine-tune a small, open source model. Hypermode addresses the AI orchestration needs of app developers for day one and beyond.
diff --git a/manifest.mdx b/manifest.mdx
deleted file mode 100644
index 6025a465..00000000
--- a/manifest.mdx
+++ /dev/null
@@ -1,19 +0,0 @@
----
-title: Project Manifest
-description: "Define your models and hosts"
-mode: "wide"
----
-
-The manifest in a Hypermode project allows you to configure the resources your functions have access to at runtime. You define the manifest in the `hypermode.json` file within the root of your project directory.
-
-
-
- Define inference services for use in your functions
-
-
- Establish connectivity for models and other external endpoints
-
-
- Define groups of text data to enable natural language search
-
-
diff --git a/mint.json b/mint.json
index 43a717fd..d2439507 100644
--- a/mint.json
+++ b/mint.json
@@ -22,75 +22,103 @@
},
"topbarLinks": [
{
- "name": "Support",
- "url": "mailto:help@hypermode.com"
+ "name": "Company",
+ "url": "https://hypermode.com/home"
}
],
"topbarCtaButton": {
"name": "Start Now",
"url": "https://hypermode.com/sign-up"
},
- "topAnchor": {
- "name": "Docs",
- "icon": "book-open-cover"
+ "primaryTab": {
+ "name": "Hypermode"
},
- "anchors": [
- {
- "name": "Home",
- "icon": "house",
- "url": "https://hypermode.com/home"
- },
- {
- "name": "Blog",
- "icon": "newspaper",
- "url": "https://hypermode.com/blog"
- },
+ "tabs": [
{
- "name": "Templates",
- "icon": "sparkles",
- "url": "https://justship.ai"
+ "name": "Modus",
+ "url": "modus"
}
],
"navigation": [
{
"group": "Get Started",
+ "pages": ["introduction", "quickstart"]
+ },
+ {
+ "group": "Develop",
+ "pages": [
+ "work-locally",
+ "deploy",
+ "configure-environment",
+ "integrate-api",
+ "observe-functions"
+ ]
+ },
+ {
+ "group": "Manage",
"pages": [
- "introduction",
- "quickstart",
- "getting-started-with-hyper-commerce"
+ "create-project",
+ "modify-project",
+ "modify-organization",
+ "user-management"
]
},
{
- "group": "Configure Project",
+ "group": "Tools",
+ "pages": ["hosted-models", "hyp-cli"]
+ },
+ {
+ "group": "Resources",
+ "pages": ["security", "community-and-support"]
+ },
+ {
+ "group": "Getting Started",
+ "pages": ["modus/overview", "modus/project-structure", "modus/quickstart"]
+ },
+ {
+ "group": "Examples",
+ "pages": ["modus/basic-functions", "modus/ai-enabled-apps"]
+ },
+ {
+ "group": "Building Your App",
"pages": [
- "manifest",
- "define-models",
- "define-hosts",
- "define-collections",
- "define-schema"
+ "modus/app-manifest",
+ "modus/data-fetching",
+ "modus/model-invoking",
+ "modus/search",
+ "modus/api-generation",
+ "modus/authentication",
+ "modus/error-handling",
+ "modus/testing",
+ "modus/deploying",
+ "modus/upgrading"
]
},
{
- "group": "Functions SDK",
+ "group": "API Reference",
"pages": [
- "sdk/functions-sdk",
- {
- "group": "API Reference",
- "pages": [
- "sdk/collections",
- "sdk/console",
- "sdk/graphql",
- "sdk/http",
- "sdk/models",
- "sdk/postgresql",
- "sdk/dgraph"
- ]
- }
+ "modus/sdk/collections",
+ "modus/sdk/console",
+ "modus/sdk/dgraph",
+ "modus/sdk/graphql",
+ "modus/sdk/http",
+ "modus/sdk/models",
+ "modus/sdk/postgresql"
]
},
{
- "group": "Observe and Iterate",
- "pages": ["deploy", "function-observability"]
+ "group": "Tools",
+ "pages": ["modus/modus-cli"]
+ },
+ {
+ "group": "Resources",
+ "pages": [
+ "modus/architecture",
+ "modus/troubleshooting",
+ "modus/roadmap",
+ "modus/contributing",
+ "modus/changelog"
+ ]
}
],
"footerSocials": {
diff --git a/modify-organization.mdx b/modify-organization.mdx
new file mode 100644
index 00000000..85c47c8e
--- /dev/null
+++ b/modify-organization.mdx
@@ -0,0 +1,4 @@
+---
+title: Modify Organization
+description: ""
+---
diff --git a/modify-project.mdx b/modify-project.mdx
new file mode 100644
index 00000000..ab600a2b
--- /dev/null
+++ b/modify-project.mdx
@@ -0,0 +1,4 @@
+---
+title: Modify Project
+description: ""
+---
diff --git a/modus/ai-enabled-apps.mdx b/modus/ai-enabled-apps.mdx
new file mode 100644
index 00000000..bfac7499
--- /dev/null
+++ b/modus/ai-enabled-apps.mdx
@@ -0,0 +1,4 @@
+---
+title: AI-Enabled Apps
+description: ""
+---
diff --git a/define-schema.mdx b/modus/api-generation.mdx
similarity index 98%
rename from define-schema.mdx
rename to modus/api-generation.mdx
index 9e90e6a6..39f46f96 100644
--- a/define-schema.mdx
+++ b/modus/api-generation.mdx
@@ -1,5 +1,5 @@
---
-title: Define Schema
+title: API Generation
description: "Create the signature for your API"
---
diff --git a/define-hosts.mdx b/modus/app-manifest.mdx
similarity index 55%
rename from define-hosts.mdx
rename to modus/app-manifest.mdx
index 496def6c..2c7b60c6 100644
--- a/define-hosts.mdx
+++ b/modus/app-manifest.mdx
@@ -1,13 +1,27 @@
---
-title: Define Hosts
-description: "Securely connect to your data"
+title: App Manifest
+description: "Define your models and hosts"
---
-## Overview
+The manifest in a Hypermode project allows you to configure the resources your functions have access to at runtime. You define the manifest in the `hypermode.json` file within the root of your project directory.
+
+
+
+ Define inference services for use in your functions
+
+
+ Establish connectivity for models and other external endpoints
+
+
+ Define groups of text data to enable natural language search
+
+
+
+## Hosts
Hosts establish connectivity to external services. They're used for HTTP and GraphQL APIs,
database connections, and externally hosted AI models. The `hosts` object in the
-[project manifest](/manifest) allows you to define these hosts, for secure access from within a function.
+app manifest allows you to define these hosts, for secure access from within a function.
Each host requires a unique name, specified as a key containing only alphanumeric characters and hyphens.
@@ -35,12 +49,12 @@ Hypermode Console, where they're securely stored until needed.
{/* */}
-## HTTP Host
+### HTTP Host
This host type supports the HTTP and HTTPS protocols to communicate with external hosts.
-You can use the [HTTP APIs](/sdk/http) in the Functions SDK to interact with the host.
+You can use the [HTTP APIs](/modus/sdk/http) in the Functions SDK to interact with the host.
-This host type is also used for [GraphQL APIs](/sdk/graphql) and to invoke externally hosted AI [models](/sdk/models).
+This host type is also used for [GraphQL APIs](/modus/sdk/graphql) and to invoke externally hosted AI [models](/modus/sdk/models).
**Example:**
@@ -142,10 +156,10 @@ This example specifies a query parameter named `key` provided by a secret named
-## PostgreSQL Host
+### PostgreSQL Host
This host type supports connecting to PostgreSQL databases.
-You can use the [PostgreSQL APIs](/sdk/postgresql) in the Functions SDK to interact with the database.
+You can use the [PostgreSQL APIs](/modus/sdk/postgresql) in the Functions SDK to interact with the database.
**Example:**
@@ -189,10 +203,10 @@ For example, if using Neon, refer to the [Neon documentation](https://neon.tech/
-## Dgraph Host
+### Dgraph Host
This host type supports connecting to Dgraph databases.
-You can use the [Dgraph APIs](/sdk/dgraph) in the Functions SDK to interact with the database.
+You can use the [Dgraph APIs](/modus/sdk/dgraph) in the Functions SDK to interact with the database.
**Example:**
@@ -219,3 +233,128 @@ You can use the [Dgraph APIs](/sdk/dgraph) in the Functions SDK to interact with
The API key for the Dgraph database.
+
+## Models
+
+AI models are a core resource for inferencing.
+The `models` object in the app manifest allows you to easily define models, whether hosted by Hypermode or another host.
+
+```json hypermode.json
+{
+ "models": {
+ "sentiment-classifier": {
+ "task": "classification",
+ "sourceModel": "distilbert/distilbert-base-uncased-finetuned-sst-2-english",
+ "provider": "hugging-face",
+ "host": "hypermode"
+ }
+ }
+}
+```
+
+Each model requires a unique name, specified as a key, containing only alphanumeric characters and hyphens.
+
+### Models Properties
+
+
+ Training intent of the model. Currently, must be one of: `classification`,
+ `embedding`, or `generation`.
+
+
+
+ Original relative path of the model within the provider's repository.
+
+
+
+ Organization or directory that provided the source model, such as
+ `hugging-face` or `openai`.
+
+
+
+ Host for the model instance.
+
+- Specify `"hypermode"` for models that are automatically deployed by Hypermode.
+- Otherwise, specify a name that matches a host defined in the [`hosts`](#hosts) section of the manifest.
+
+
+
+### Auto-deployed models
+
+When using `hugging-face` as the `provider` and `hypermode` as the `host`, Hypermode automatically deploys a dedicated
+instance of the defined `sourceModel` when deploying your project. Your project's functions securely connect to the
+hosted model, with no further configuration required.
+
+## Collections
+
+Collections are a key integration aspect with [models](#models) to create smart, searchable text.
+The `collections` object in the app manifest allows you to define groupings of text and functions to embed inserted text with.
+
+```json hypermode.json
+{
+ "collections": {
+ // This defines a collection of products, having two search methods.
+ "myProducts": {
+ "searchMethods": {
+ "searchMethod1": {
+ // The embedder is the name of the function that will be used to generate vector embeddings.
+ // By default, it uses a sequential index.
+ "embedder": "embed"
+ },
+
+ // This is an example of a second search method.
+ // It could use a different embedder or index type, if desired.
+ "searchMethod2": {
+ "embedder": "embed",
+ "index": {
+ "type": "sequential"
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+Each collection requires a unique name, specified as a key, containing only alphanumeric characters and hyphens.
+
+### Collections Properties
+
+
+ If provided, adds an index on top of the collection. Each key-value pair is a
+ search method and values.
+
+
+ An exported function name used by the search method to embed text in the collection. Function must have a call signature with input `string[]` and return type `f32[][]`.
+
+
+ This example specifies a `searchMethod` with an embedder named `embed`
+
+```json
+"searchMethod1": {
+ "embedder": "embed"
+}
+```
+
+
+
+
+
+
+ If provided, describes the index mechanism used by the search method. `type`: specifies the type of the index. For example, `sequential` (default).
+
+
+ This example specifies a `searchMethod` with an embedder named `embed` and an index with type `sequential`
+
+```json
+"searchMethod1": {
+ "embedder": "embed"
+ "index": {
+ "type": "sequential"
+ }
+}
+```
+
+
+
+
+
diff --git a/modus/architecture.mdx b/modus/architecture.mdx
new file mode 100644
index 00000000..56af4ad2
--- /dev/null
+++ b/modus/architecture.mdx
@@ -0,0 +1,4 @@
+---
+title: Architecture
+description: ""
+---
diff --git a/modus/authentication.mdx b/modus/authentication.mdx
new file mode 100644
index 00000000..bd098b6f
--- /dev/null
+++ b/modus/authentication.mdx
@@ -0,0 +1,4 @@
+---
+title: Authentication
+description: ""
+---
diff --git a/modus/basic-functions.mdx b/modus/basic-functions.mdx
new file mode 100644
index 00000000..a923af07
--- /dev/null
+++ b/modus/basic-functions.mdx
@@ -0,0 +1,4 @@
+---
+title: Basic Functions
+description: ""
+---
diff --git a/modus/changelog.mdx b/modus/changelog.mdx
new file mode 100644
index 00000000..9a1f2f3e
--- /dev/null
+++ b/modus/changelog.mdx
@@ -0,0 +1,4 @@
+---
+title: Changelog
+description: ""
+---
diff --git a/modus/contributing.mdx b/modus/contributing.mdx
new file mode 100644
index 00000000..fde75cfd
--- /dev/null
+++ b/modus/contributing.mdx
@@ -0,0 +1,4 @@
+---
+title: Contributing
+description: ""
+---
diff --git a/modus/data-fetching.mdx b/modus/data-fetching.mdx
new file mode 100644
index 00000000..eed6d5b1
--- /dev/null
+++ b/modus/data-fetching.mdx
@@ -0,0 +1,4 @@
+---
+title: Data Fetching
+description: ""
+---
diff --git a/modus/deploying.mdx b/modus/deploying.mdx
new file mode 100644
index 00000000..22fff216
--- /dev/null
+++ b/modus/deploying.mdx
@@ -0,0 +1,4 @@
+---
+title: Deploying
+description: ""
+---
diff --git a/modus/error-handling.mdx b/modus/error-handling.mdx
new file mode 100644
index 00000000..f5e1f0c1
--- /dev/null
+++ b/modus/error-handling.mdx
@@ -0,0 +1,4 @@
+---
+title: Error Handling
+description: ""
+---
diff --git a/modus/model-invoking.mdx b/modus/model-invoking.mdx
new file mode 100644
index 00000000..b411c785
--- /dev/null
+++ b/modus/model-invoking.mdx
@@ -0,0 +1,4 @@
+---
+title: Model Invoking
+description: ""
+---
diff --git a/modus/modus-cli.mdx b/modus/modus-cli.mdx
new file mode 100644
index 00000000..2ed29df4
--- /dev/null
+++ b/modus/modus-cli.mdx
@@ -0,0 +1,4 @@
+---
+title: Modus CLI
+description: ""
+---
diff --git a/sdk/functions-sdk.mdx b/modus/overview.mdx
similarity index 76%
rename from sdk/functions-sdk.mdx
rename to modus/overview.mdx
index 6d36c9e3..47ffebe2 100644
--- a/sdk/functions-sdk.mdx
+++ b/modus/overview.mdx
@@ -1,7 +1,6 @@
---
-title: Hypermode Functions SDK Overview
-sidebarTitle: Overview
-description: "Providing the foundation for your Hypermode projects."
+title: Overview
+description: ""
mode: "wide"
---
@@ -32,29 +31,29 @@ The following APIs are available in the Functions SDK:
-
+
Access a built-in key-value store to add storage and AI-based search
capabilities.
-
+
Capture log messages, errors, and timing operations to iterate faster.
-
+
+ Execute queries and mutations against a Dgraph database.
+
+
Access remote data from GraphQL-enabled databases and APIs.
-
+
Securely call and fetch data from any HTTP endpoint.
-
+
Use AI models for use cases such as classification, summarization, content
generation, and more.
-
+
Execute queries against a PostgreSQL database.
-
- Execute queries and mutations against a Dgraph database.
-
## Installation
diff --git a/modus/project-structure.mdx b/modus/project-structure.mdx
new file mode 100644
index 00000000..79e3f504
--- /dev/null
+++ b/modus/project-structure.mdx
@@ -0,0 +1,4 @@
+---
+title: Project Structure
+description: ""
+---
diff --git a/modus/quickstart.mdx b/modus/quickstart.mdx
new file mode 100644
index 00000000..6c94fd22
--- /dev/null
+++ b/modus/quickstart.mdx
@@ -0,0 +1,4 @@
+---
+title: Quickstart
+description: ""
+---
diff --git a/modus/roadmap.mdx b/modus/roadmap.mdx
new file mode 100644
index 00000000..518eb4d3
--- /dev/null
+++ b/modus/roadmap.mdx
@@ -0,0 +1,4 @@
+---
+title: Roadmap
+description: ""
+---
diff --git a/sdk/collections.mdx b/modus/sdk/collections.mdx
similarity index 93%
rename from sdk/collections.mdx
rename to modus/sdk/collections.mdx
index d2140007..a93e81a9 100644
--- a/sdk/collections.mdx
+++ b/modus/sdk/collections.mdx
@@ -6,7 +6,7 @@ description: "Add basic storage and search capabilities to your functions."
{/* */}
Hypermode Collections provide a built-in key-value storage mechanism that supports vector
-embeddings, that you can use from your functions. After [defining collections](../define-collections)
+embeddings, that you can use from your functions. After [defining collections](../app-manifest#collections)
in your project's manifest, you can use the following APIs to interact with the data.
## Example project
@@ -59,7 +59,8 @@ collections.upsert(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -99,7 +100,8 @@ collections.upsertBatch(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -132,7 +134,8 @@ collections.remove(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -166,7 +169,8 @@ collections.search(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -210,7 +214,8 @@ collections.searchByVector(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -247,7 +252,8 @@ Classify an item in the collection using previous vectors' labels.
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -277,7 +283,8 @@ collections.computeDistance(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -305,7 +312,8 @@ collections.getText(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -329,7 +337,8 @@ collections.getTexts(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -347,7 +356,8 @@ collections.getNamespaces(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
#### getVector
@@ -364,7 +374,8 @@ collections.getVector(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -392,7 +403,8 @@ collections.getLabels(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
@@ -418,7 +430,8 @@ collections.recomputeSearchMethod(
```
- Name of the collection, as [defined in the manifest](../define-collections).
+ Name of the collection, as [defined in the
+ manifest](../app-manifest#collections).
diff --git a/sdk/console.mdx b/modus/sdk/console.mdx
similarity index 100%
rename from sdk/console.mdx
rename to modus/sdk/console.mdx
diff --git a/sdk/dgraph.mdx b/modus/sdk/dgraph.mdx
similarity index 93%
rename from sdk/dgraph.mdx
rename to modus/sdk/dgraph.mdx
index 6383cdee..fb7a69d5 100644
--- a/sdk/dgraph.mdx
+++ b/modus/sdk/dgraph.mdx
@@ -7,7 +7,7 @@ description: "Execute queries and mutations against a Dgraph database."
Hypermode's Dgraph APIs allow you to run queries and mutations against a Dgraph database, as well as alter
the schema if necessary.
-After [defining a host](../define-hosts) for your Dgraph gRPC endpoint in your project's manifest,
+After [defining a host](../app-manifest#hosts) for your Dgraph gRPC endpoint in your project's manifest,
you can use the following APIs to interact with the database.
## Example project
@@ -48,7 +48,7 @@ function execute(hostName: string, request: Request): Response;
```
- Name of the host, as [defined in the manifest](../define-hosts).
+ Name of the host, as [defined in the manifest](../app-manifest#hosts).
@@ -65,7 +65,7 @@ function alterSchema(hostName: string, schema: string): string;
```
- Name of the host, as [defined in the manifest](../define-hosts).
+ Name of the host, as [defined in the manifest](../app-manifest#hosts).
@@ -81,7 +81,7 @@ function dropAttr(hostName: string, attr: string): string;
```
- Name of the host, as [defined in the manifest](../define-hosts).
+ Name of the host, as [defined in the manifest](../app-manifest#hosts).
@@ -97,7 +97,7 @@ function dropAll(hostName: string): string;
```
- Name of the host, as [defined in the manifest](../define-hosts).
+ Name of the host, as [defined in the manifest](../app-manifest#hosts).
### Objects
diff --git a/sdk/graphql.mdx b/modus/sdk/graphql.mdx
similarity index 97%
rename from sdk/graphql.mdx
rename to modus/sdk/graphql.mdx
index c27dc3c6..442a731f 100644
--- a/sdk/graphql.mdx
+++ b/modus/sdk/graphql.mdx
@@ -6,7 +6,7 @@ description: "Access external GraphQL data sources from your functions."
{/* */}
Hypermode's GraphQL APIs allows you to securely call and fetch data from any GraphQL endpoint.
-After [defining a host](../define-hosts) for the GraphQL endpoint in your project's manifest,
+After [defining a host](../app-manifest#hosts) for the GraphQL endpoint in your project's manifest,
you can use the following APIs to interact with the data.
## Example project
@@ -68,7 +68,7 @@ You can also use built-in types such as strings, numbers, arrays, and maps.
- Name of the host, as [defined in the manifest](../define-hosts).
+ Name of the host, as [defined in the manifest](../app-manifest#hosts).
diff --git a/sdk/http.mdx b/modus/sdk/http.mdx
similarity index 99%
rename from sdk/http.mdx
rename to modus/sdk/http.mdx
index 63c990c3..5c5417be 100644
--- a/sdk/http.mdx
+++ b/modus/sdk/http.mdx
@@ -11,7 +11,7 @@ but with some modifications to work with Hypermode Functions.
-As a security measure, you can only call HTTP endpoints that you've [defined in your project's manifest](../define-hosts).
+As a security measure, you can only call HTTP endpoints that you've [defined in your project's manifest](../app-manifest#hosts).
Any attempt to access an arbitrary URL, for a host not defined in your project's manifest, results in an error.
Additionally, you should use placeholders for host secrets in the manifest, rather than hardcoding them in your functions.
diff --git a/sdk/models.mdx b/modus/sdk/models.mdx
similarity index 100%
rename from sdk/models.mdx
rename to modus/sdk/models.mdx
diff --git a/sdk/postgresql.mdx b/modus/sdk/postgresql.mdx
similarity index 96%
rename from sdk/postgresql.mdx
rename to modus/sdk/postgresql.mdx
index 606a7281..d6d54031 100644
--- a/sdk/postgresql.mdx
+++ b/modus/sdk/postgresql.mdx
@@ -7,7 +7,7 @@ description: "Execute queries against a PostgreSQL database."
Hypermode's PostgreSQL API allows you to run queries against PostgreSQL or any PostgreSQL compatible database
platform, such as [Neon](https://neon.tech/).
-After [defining a host](../define-hosts) for the PostgreSQL endpoint in your project's manifest,
+After [defining a host](../app-manifest#hosts) for the PostgreSQL endpoint in your project's manifest,
you can use the following APIs to interact with the data.
## Example project
@@ -61,7 +61,7 @@ function postgresql.execute (
```
- Name of the host, as [defined in the manifest](../define-hosts).
+ Name of the host, as [defined in the manifest](../app-manifest#hosts).
@@ -118,7 +118,7 @@ If working with PostgreSQL's `point` data type, you can use a [`Point`](#point)
- Name of the host, as [defined in the manifest](../define-hosts).
+ Name of the host, as [defined in the manifest](../app-manifest#hosts).
@@ -161,7 +161,7 @@ function postgresql.queryScalar (
- Name of the host, as [defined in the manifest](../define-hosts).
+ Name of the host, as [defined in the manifest](../app-manifest#hosts).
diff --git a/modus/search.mdx b/modus/search.mdx
new file mode 100644
index 00000000..03607e24
--- /dev/null
+++ b/modus/search.mdx
@@ -0,0 +1,4 @@
+---
+title: Search
+description: ""
+---
diff --git a/modus/testing.mdx b/modus/testing.mdx
new file mode 100644
index 00000000..7a87f4c9
--- /dev/null
+++ b/modus/testing.mdx
@@ -0,0 +1,4 @@
+---
+title: Testing
+description: ""
+---
diff --git a/modus/troubleshooting.mdx b/modus/troubleshooting.mdx
new file mode 100644
index 00000000..347634a0
--- /dev/null
+++ b/modus/troubleshooting.mdx
@@ -0,0 +1,4 @@
+---
+title: Troubleshooting
+description: ""
+---
diff --git a/modus/upgrading.mdx b/modus/upgrading.mdx
new file mode 100644
index 00000000..d34fa0d1
--- /dev/null
+++ b/modus/upgrading.mdx
@@ -0,0 +1,4 @@
+---
+title: Upgrading
+description: ""
+---
diff --git a/function-observability.mdx b/observe-functions.mdx
similarity index 92%
rename from function-observability.mdx
rename to observe-functions.mdx
index c938b179..9e7e03bf 100644
--- a/function-observability.mdx
+++ b/observe-functions.mdx
@@ -1,5 +1,5 @@
---
-title: Function Observability
+title: Observe Functions
description: "Understand what's happening within your functions"
---
diff --git a/quickstart.mdx b/quickstart.mdx
index 0c2d3837..ce4c4a9b 100644
--- a/quickstart.mdx
+++ b/quickstart.mdx
@@ -1,5 +1,5 @@
---
-title: "Quickstart: Base Template"
+title: "Quickstart"
description: "Start building AI features in under five minutes"
mode: "wide"
---
@@ -9,10 +9,10 @@ mode: "wide"
Use the [template](https://github.com/hypermodeinc/base-template) to set up your Hypermode project.
- Define your [AI models](/define-models) in your [project manifest](/manifest). You'll reference these model definitions in your functions.
+ Define your [AI models](/modus/app-manifest#models) in your [project manifest](/modus/app-manifest). You'll reference these model definitions in your functions.
- Use the [Functions SDK](/sdk/functions-sdk) to write your functions. Expose your functions through the project [schema](/define-schema).
+ Use the [Functions SDK](/modus) to write your functions. Expose your functions through the project [schema](/modus/api-generation).
Hypermode makes it easy to iterate on your AI features.
diff --git a/security.mdx b/security.mdx
new file mode 100644
index 00000000..f9f972ee
--- /dev/null
+++ b/security.mdx
@@ -0,0 +1,4 @@
+---
+title: Security
+description: ""
+---
diff --git a/user-management.mdx b/user-management.mdx
new file mode 100644
index 00000000..5a29dfa4
--- /dev/null
+++ b/user-management.mdx
@@ -0,0 +1,4 @@
+---
+title: User Management
+description: ""
+---
diff --git a/work-locally.mdx b/work-locally.mdx
new file mode 100644
index 00000000..7912ab28
--- /dev/null
+++ b/work-locally.mdx
@@ -0,0 +1,4 @@
+---
+title: Work Locally
+description: ""
+---
From 8a7461fc4eb6b0a5f433d3f856cae3cdc175e67a Mon Sep 17 00:00:00 2001
From: Ryan Fox-Tyler <60440289+ryanfoxtyler@users.noreply.github.com>
Date: Fri, 4 Oct 2024 10:34:26 -0400
Subject: [PATCH 2/9] Update mint.json
---
mint.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/mint.json b/mint.json
index d2439507..7b3b121a 100644
--- a/mint.json
+++ b/mint.json
@@ -7,6 +7,7 @@
"href": "/"
},
"favicon": "/favicon.svg",
+ "theme": "venus",
"colors": {
"primary": "#6342CB",
"light": "#9C85E3",
From bedc076d875355fd69e4701674baf79884b3e3c0 Mon Sep 17 00:00:00 2001
From: Ryan Fox-Tyler <60440289+ryanfoxtyler@users.noreply.github.com>
Date: Fri, 4 Oct 2024 10:41:36 -0400
Subject: [PATCH 3/9] update top buttons
---
mint.json | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/mint.json b/mint.json
index 7b3b121a..1cb321b8 100644
--- a/mint.json
+++ b/mint.json
@@ -25,11 +25,15 @@
{
"name": "Company",
"url": "https://hypermode.com/home"
+ },
+ {
+ "name": "Start Now",
+ "url": "https://hypermode.com/sign-up"
}
],
"topbarCtaButton": {
- "name": "Start Now",
- "url": "https://hypermode.com/sign-up"
+ "type": "github",
+ "url": "https://github.com/hypermodeinc/modus"
},
"primaryTab": {
"name": "Hypermode"
From 89e4c169f553bc3ddd0ee5d3995376645444d6b8 Mon Sep 17 00:00:00 2001
From: Ryan Fox-Tyler <60440289+ryanfoxtyler@users.noreply.github.com>
Date: Fri, 4 Oct 2024 10:42:49 -0400
Subject: [PATCH 4/9] Update mint.json
---
mint.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mint.json b/mint.json
index 1cb321b8..29591fb9 100644
--- a/mint.json
+++ b/mint.json
@@ -46,7 +46,7 @@
],
"navigation": [
{
- "group": "Get Started",
+ "group": "Getting Started",
"pages": ["introduction", "quickstart"]
},
{
From 2589b0d65605f4238519edbf6957f8329583330d Mon Sep 17 00:00:00 2001
From: Ryan Fox-Tyler <60440289+ryanfoxtyler@users.noreply.github.com>
Date: Fri, 4 Oct 2024 12:25:12 -0400
Subject: [PATCH 5/9] add anchors
---
mint.json | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/mint.json b/mint.json
index 29591fb9..bec028d0 100644
--- a/mint.json
+++ b/mint.json
@@ -44,6 +44,18 @@
"url": "modus"
}
],
+ "anchors": [
+ {
+ "name": "Hypermode",
+ "icon": "cloud",
+ "url": ""
+ },
+ {
+ "name": "Modus",
+ "icon": "code",
+ "url": "modus"
+ }
+ ],
"navigation": [
{
"group": "Getting Started",
From c64851b137bce4b5f732cb7d0a332efc0cdc0d77 Mon Sep 17 00:00:00 2001
From: Ryan Fox-Tyler <60440289+ryanfoxtyler@users.noreply.github.com>
Date: Fri, 4 Oct 2024 12:26:27 -0400
Subject: [PATCH 6/9] Update mint.json
---
mint.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mint.json b/mint.json
index bec028d0..0415e2e8 100644
--- a/mint.json
+++ b/mint.json
@@ -48,7 +48,7 @@
{
"name": "Hypermode",
"icon": "cloud",
- "url": ""
+ "url": "/"
},
{
"name": "Modus",
From b33029f1861f54f576553dbab418443018e3756a Mon Sep 17 00:00:00 2001
From: Ryan Fox-Tyler <60440289+ryanfoxtyler@users.noreply.github.com>
Date: Fri, 4 Oct 2024 12:27:33 -0400
Subject: [PATCH 7/9] Update mint.json
---
mint.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mint.json b/mint.json
index 0415e2e8..a192a8f8 100644
--- a/mint.json
+++ b/mint.json
@@ -48,7 +48,7 @@
{
"name": "Hypermode",
"icon": "cloud",
- "url": "/"
+ "url": "https://docs.hypermode.com"
},
{
"name": "Modus",
From d6f9a146ba8b942bf02d7769db68a67ddc137173 Mon Sep 17 00:00:00 2001
From: Ryan Fox-Tyler <60440289+ryanfoxtyler@users.noreply.github.com>
Date: Fri, 4 Oct 2024 12:28:43 -0400
Subject: [PATCH 8/9] Update mint.json
---
mint.json | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/mint.json b/mint.json
index a192a8f8..29591fb9 100644
--- a/mint.json
+++ b/mint.json
@@ -44,18 +44,6 @@
"url": "modus"
}
],
- "anchors": [
- {
- "name": "Hypermode",
- "icon": "cloud",
- "url": "https://docs.hypermode.com"
- },
- {
- "name": "Modus",
- "icon": "code",
- "url": "modus"
- }
- ],
"navigation": [
{
"group": "Getting Started",
From 634c8917fa0f6ae84b3a1ae74d4e2ba8c8339a5f Mon Sep 17 00:00:00 2001
From: Ryan Fox-Tyler <60440289+ryanfoxtyler@users.noreply.github.com>
Date: Fri, 4 Oct 2024 12:30:54 -0400
Subject: [PATCH 9/9] Update mint.json
---
mint.json | 1 -
1 file changed, 1 deletion(-)
diff --git a/mint.json b/mint.json
index 29591fb9..209d0d60 100644
--- a/mint.json
+++ b/mint.json
@@ -7,7 +7,6 @@
"href": "/"
},
"favicon": "/favicon.svg",
- "theme": "venus",
"colors": {
"primary": "#6342CB",
"light": "#9C85E3",