diff --git a/.github/actionlint.yml b/.github/actionlint.yml
new file mode 100644
index 00000000..2bc86c10
--- /dev/null
+++ b/.github/actionlint.yml
@@ -0,0 +1,4 @@
+self-hosted-runner:
+ # Labels of self-hosted runner in array of string
+ labels:
+ - warp-ubuntu-latest-x64-2x
diff --git a/.github/workflows/no-broken-links.yml b/.github/workflows/no-broken-links.yml
index ca27ddd9..6f9f229f 100644
--- a/.github/workflows/no-broken-links.yml
+++ b/.github/workflows/no-broken-links.yml
@@ -1,20 +1,24 @@
name: No Broken Links
+
on:
pull_request:
branches:
- main
+permissions: read-all
+
jobs:
no-broken-links:
+ name: Broken Link Checker
runs-on: warp-ubuntu-latest-x64-2x
steps:
- name: Checkout Repository
uses: actions/checkout@v4
-
+
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- - name: Run mintlify script
+ - name: Run Mintlify Script
run: npx mintlify broken-links
diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/vale.yml
similarity index 66%
rename from .github/workflows/ci-lint.yml
rename to .github/workflows/vale.yml
index e9011847..ccd62379 100644
--- a/.github/workflows/ci-lint.yml
+++ b/.github/workflows/vale.yml
@@ -1,4 +1,5 @@
-name: ci-lint
+name: Vale
+
on:
pull_request:
types:
@@ -6,15 +7,18 @@ on:
- reopened
- synchronize
- ready_for_review
+
+permissions: read-all
+
jobs:
vale:
- name: vale
+ name: Vale Lanugage Review
runs-on: warp-ubuntu-latest-x64-2x
steps:
- uses: actions/checkout@v4
- uses: errata-ai/vale-action@reviewdog
env:
- GITHUB_TOKEN: ${{secrets.GH_READER}}
+ github_token: ${{ secrets.GITHUB_TOKEN }}
with:
- vale_flags: "--glob=*.mdx"
+ vale_flags: --glob=*.mdx
fail_on_error: true
diff --git a/.trunk/.gitignore b/.trunk/.gitignore
new file mode 100644
index 00000000..15966d08
--- /dev/null
+++ b/.trunk/.gitignore
@@ -0,0 +1,9 @@
+*out
+*logs
+*actions
+*notifications
+*tools
+plugins
+user_trunk.yaml
+user.yaml
+tmp
diff --git a/.trunk/configs/.markdownlint.json b/.trunk/configs/.markdownlint.json
new file mode 100644
index 00000000..26593a22
--- /dev/null
+++ b/.trunk/configs/.markdownlint.json
@@ -0,0 +1,4 @@
+{
+ "MD013": false,
+ "MD033": false
+}
diff --git a/.trunk/configs/.yamllint.yaml b/.trunk/configs/.yamllint.yaml
new file mode 100644
index 00000000..184e251f
--- /dev/null
+++ b/.trunk/configs/.yamllint.yaml
@@ -0,0 +1,7 @@
+rules:
+ quoted-strings:
+ required: only-when-needed
+ extra-allowed: ["{|}"]
+ key-duplicates: {}
+ octal-values:
+ forbid-implicit-octal: true
diff --git a/.trunk/configs/svgo.config.js b/.trunk/configs/svgo.config.js
new file mode 100644
index 00000000..b257d134
--- /dev/null
+++ b/.trunk/configs/svgo.config.js
@@ -0,0 +1,14 @@
+module.exports = {
+ plugins: [
+ {
+ name: "preset-default",
+ params: {
+ overrides: {
+ removeViewBox: false, // https://github.com/svg/svgo/issues/1128
+ sortAttrs: true,
+ removeOffCanvasPaths: true,
+ },
+ },
+ },
+ ],
+};
diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml
new file mode 100644
index 00000000..e59b9c58
--- /dev/null
+++ b/.trunk/trunk.yaml
@@ -0,0 +1,40 @@
+# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
+version: 0.1
+
+cli:
+ version: 1.21.0
+
+plugins:
+ sources:
+ - id: trunk
+ ref: v1.4.5
+ uri: https://github.com/trunk-io/plugins
+
+runtimes:
+ enabled:
+ - node@18.12.1
+ - python@3.10.8
+
+lint:
+ enabled:
+ - actionlint@1.6.27
+ - checkov@3.2.53
+ - git-diff-check
+ - markdownlint@0.39.0
+ - oxipng@9.0.0
+ - prettier@3.2.5
+ - svgo@3.2.0
+ - trivy@0.50.1
+ - trufflehog@3.71.0
+ - yamllint@1.35.1
+ ignore:
+ - linters: [ALL]
+ paths:
+ - styles
+
+actions:
+ enabled:
+ - trunk-announce
+ - trunk-check-pre-push
+ - trunk-fmt-pre-commit
+ - trunk-upgrade-available
diff --git a/README.md b/README.md
index 74ca0aeb..9cd05cc1 100644
--- a/README.md
+++ b/README.md
@@ -35,8 +35,6 @@ Format and lint changes for easy merging.
npm i -D @trunkio/launcher
```
-
-
# Writing
Mintlify includes a [number of components](https://mintlify.com/docs/content/components/accordions) to make it easier to build easy-to-consume documentation.
diff --git a/define-hosts.mdx b/define-hosts.mdx
index 3cd3b0d2..dfc087ee 100644
--- a/define-hosts.mdx
+++ b/define-hosts.mdx
@@ -1,6 +1,6 @@
---
title: Define Hosts
-description: ''
+description: ""
---
Hosts establish connectivity for AI models and other external endpoints. The [project manifest](/manifest) allows you to define hosts for secure access from within a function.
@@ -9,8 +9,8 @@ Hosts establish connectivity for AI models and other external endpoints. The [pr
{
"hosts": [
{
- "name": "openai"
- "endpoint": "https://api.openai.com/v1"
+ "name": "openai",
+ "endpoint": "https://api.openai.com/v1"
}
]
}
@@ -19,7 +19,8 @@ Hosts establish connectivity for AI models and other external endpoints. The [pr
## Properties
- Internal name of your host. Used for indicating the host of a model or for a connection.
+ Internal name of your host. Used for indicating the host of a model or for a
+ connection.
diff --git a/define-models.mdx b/define-models.mdx
index 24e17494..8805bb15 100644
--- a/define-models.mdx
+++ b/define-models.mdx
@@ -1,6 +1,6 @@
---
title: Define Models
-description: ''
+description: ""
---
AI models are a core resource for inferencing. The [project manifest](/manifest) allows you to easily define models whether hosted by Hypermode or another host.
@@ -9,11 +9,11 @@ AI models are a core resource for inferencing. The [project manifest](/manifest)
{
"models": [
{
- "name": "sentiment-classifier",
- "task": "classification",
- "sourceModel": "distilbert/distilbert-base-uncased-finetuned-sst-2-english",
- "provider": "hugging-face",
- "host": "hypermode"
+ "name": "sentiment-classifier",
+ "task": "classification",
+ "sourceModel": "distilbert/distilbert-base-uncased-finetuned-sst-2-english",
+ "provider": "hugging-face",
+ "host": "hypermode"
}
]
}
@@ -22,7 +22,8 @@ AI models are a core resource for inferencing. The [project manifest](/manifest)
## Properties
- Internal name of your AI model. Used for indicating the model to use in an API call.
+ Internal name of your AI model. Used for indicating the model to use in an API
+ call.
@@ -54,4 +55,4 @@ AI models are a core resource for inferencing. The [project manifest](/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.
\ No newline at end of file
+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/define-schema.mdx b/define-schema.mdx
index d409e314..3a138d07 100644
--- a/define-schema.mdx
+++ b/define-schema.mdx
@@ -1,9 +1,12 @@
---
title: Define Schema
-description: ''
+description: ""
---
-A new approach for schema definition is currently in development. Expect this to be simpler in the next few weeks. Feedback welcomed!
+
+ A new approach for schema definition is currently in development. Expect this
+ to be simpler in the next few weeks. Feedback welcomed!
+
The schema exposes functions on your project's API endpoint. Define your schema in the `schema.graphql` file in your project.
@@ -11,11 +14,11 @@ The schema exposes functions on your project's API endpoint. Define your schema
directive @hm_function on FIELD_DEFINITION
type Query {
- classifySentiment(text: String!): String! @lambda @hm_function
- classifySeverity(text: String!): String! @lambda @hm_function
+ classifySentiment(text: String!): String! @lambda @hm_function
+ classifySeverity(text: String!): String! @lambda @hm_function
}
```
Hypermode follows [GraphQL's standard definition language](https://graphql.org/learn/schema/). Add your function signature and the [directive](https://graphql.org/learn/queries/#directives) `@lambda @hm_function` to register the function on the project's endpoint. The signature must match the exposed function in your `index.ts` file.
-When deployed, your GraphQL API is available on the `/graphql` path from your project's endpoint. The endpoint is visible in the Hypermode Console on the Project Home screen.
\ No newline at end of file
+When deployed, your GraphQL API is available on the `/graphql` path from your project's endpoint. The endpoint is visible in the Hypermode Console on the Project Home screen.
diff --git a/deploy.mdx b/deploy.mdx
index fc9c2d94..c56e2b1b 100644
--- a/deploy.mdx
+++ b/deploy.mdx
@@ -1,11 +1,13 @@
---
title: Deploy Project
-description: ''
+description: ""
---
Hypermode leverages a native GitHub integration for the deployment of Hypermode projects. The deployment includes both the project's [manifest](/manifest) and functions.
-Preview environments for live validation of pull requests are in development.
+
+ Preview environments for live validation of pull requests are in development.
+
## Build
@@ -15,4 +17,4 @@ A GitHub Action is available in the [template project](https://github.com/gohype
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.
\ No newline at end of file
+For [auto-deployed models](/define-models#auto-deployed-models), Hypermode deploys a dedicated instance of the model.
diff --git a/favicon.svg b/favicon.svg
index 3fdb479b..284774bd 100644
--- a/favicon.svg
+++ b/favicon.svg
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/function-observability.mdx b/function-observability.mdx
index 787c2d00..63e24d13 100644
--- a/function-observability.mdx
+++ b/function-observability.mdx
@@ -1,8 +1,8 @@
---
title: Function Observability
-description: ''
+description: ""
---
When you invoke a function within your project, the service records each execution. In addition to duration, logs are available for each execution to enable integrated debugging.
-To access the run history, navigate to the Function Runs tab of your project within the Hypermode Console.
\ No newline at end of file
+To access the run history, navigate to the Function Runs tab of your project within the Hypermode Console.
diff --git a/images/architecture-dark.png b/images/architecture-dark.png
index 1c0f3747..4c6846e2 100644
Binary files a/images/architecture-dark.png and b/images/architecture-dark.png differ
diff --git a/images/architecture-light.png b/images/architecture-light.png
index db92bd79..faf54b56 100644
Binary files a/images/architecture-light.png and b/images/architecture-light.png differ
diff --git a/introduction.mdx b/introduction.mdx
index 854929b2..da3aa396 100644
--- a/introduction.mdx
+++ b/introduction.mdx
@@ -1,6 +1,6 @@
---
title: Introduction
-description: 'Welcome to Hypermode'
+description: "Welcome to Hypermode"
mode: "wide"
---
@@ -9,12 +9,14 @@ Hypermode is a framework for building AI features and assistants for your applic
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.
-
-
-
\ No newline at end of file
+
+
+
diff --git a/logo/dark.svg b/logo/dark.svg
index 3fdb479b..284774bd 100644
--- a/logo/dark.svg
+++ b/logo/dark.svg
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/logo/light.svg b/logo/light.svg
index 395a4f8d..c04895d4 100644
--- a/logo/light.svg
+++ b/logo/light.svg
@@ -1 +1 @@
-
+
\ No newline at end of file
diff --git a/manifest.mdx b/manifest.mdx
index fe5737cb..7b3ad268 100644
--- a/manifest.mdx
+++ b/manifest.mdx
@@ -1,31 +1,19 @@
---
title: Project Manifest
-description: ''
+description: ""
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` and `schema.graphql` files within the root of your project directory.
-
+
Define inference services for use in your functions
-
+
Establish connectivity for models and other external endpoints
-
+
Expose functions on your project's API endpoint
-
\ No newline at end of file
+
diff --git a/mint.json b/mint.json
index a56a55b2..03bc4eef 100644
--- a/mint.json
+++ b/mint.json
@@ -49,19 +49,11 @@
"navigation": [
{
"group": "Get Started",
- "pages": [
- "introduction",
- "quickstart"
- ]
+ "pages": ["introduction", "quickstart"]
},
{
"group": "Configure Project",
- "pages": [
- "manifest",
- "define-models",
- "define-hosts",
- "define-schema"
- ]
+ "pages": ["manifest", "define-models", "define-hosts", "define-schema"]
},
{
"group": "Write Functions",
@@ -75,10 +67,7 @@
},
{
"group": "Iterate Constantly",
- "pages": [
- "deploy",
- "function-observability"
- ]
+ "pages": ["deploy", "function-observability"]
}
],
"footerSocials": {
@@ -88,8 +77,7 @@
},
"analytics": {
"fathom": {
- "siteId": "LQSVRZXR"
+ "siteId": "LQSVRZXR"
}
}
}
-
diff --git a/quickstart.mdx b/quickstart.mdx
index 324aad60..15f15d4d 100644
--- a/quickstart.mdx
+++ b/quickstart.mdx
@@ -1,6 +1,6 @@
---
title: Quickstart
-description: 'Starting with Hypermode is simple. Iterating with Hypermode is constant.'
+description: "Starting with Hypermode is simple. Iterating with Hypermode is constant."
mode: "wide"
---
@@ -16,7 +16,8 @@ mode: "wide"
Hypermode makes it easy to iterate on your AI features.
-
+
Want to try a new model? Add a new entry to your manifest and update your function. It's that easy!
+
-
\ No newline at end of file
+
diff --git a/sdk/connection.mdx b/sdk/connection.mdx
index 3c7c0ef5..29978773 100644
--- a/sdk/connection.mdx
+++ b/sdk/connection.mdx
@@ -1,20 +1,25 @@
---
title: Connection
-description: ''
+description: ""
---
Connection APIs allow you to securely access an API endpoint at a defined host.
-We're introducing new APIs consistently through ongoing development with build partners. [Let's chat](mailto:help@hypermode.com) about what would make the Functions SDK even more powerful for your next use case!
+
+ We're introducing new APIs consistently through ongoing development with build
+ partners. [Let's chat](mailto:help@hypermode.com) about what would make the
+ Functions SDK even more powerful for your next use case!
+
### invokeGraphqlApi
+
Make a query or mutation against a GraphQL API endpoint.
```TypeScript
invokeGraphqlApi (
- hostName: string,
- query: string,
- variables?: Map
+ hostName: string,
+ query: string,
+ variables?: Map
):
```
@@ -28,4 +33,4 @@ invokeGraphqlApi (
Optional variables added to the query.
-
\ No newline at end of file
+
diff --git a/sdk/console.mdx b/sdk/console.mdx
index 2e161488..b2364f27 100644
--- a/sdk/console.mdx
+++ b/sdk/console.mdx
@@ -1,19 +1,24 @@
---
title: Console
-description: ''
+description: ""
---
Console APIs allow you to interact with the Hypermode Console.
-We're introducing new APIs consistently through ongoing development with build partners. [Let's chat](mailto:help@hypermode.com) about what would make the Functions SDK even more powerful for your next use case!
+
+ We're introducing new APIs consistently through ongoing development with build
+ partners. [Let's chat](mailto:help@hypermode.com) about what would make the
+ Functions SDK even more powerful for your next use case!
+
### log
+
Generate a log message for debugging at runtime.
```TypeScript
log (
- message: string,
- level?: string
+ message: string,
+ level?: string
)
```
@@ -22,5 +27,6 @@ log (
- Severity of log message, one of `info` (default), `error`, `warning` or `debug`.
-
\ No newline at end of file
+ Severity of log message, one of `info` (default), `error`, `warning` or
+ `debug`.
+
diff --git a/sdk/functions-sdk.mdx b/sdk/functions-sdk.mdx
index 89c35e8b..749c9eca 100644
--- a/sdk/functions-sdk.mdx
+++ b/sdk/functions-sdk.mdx
@@ -1,46 +1,35 @@
---
title: Functions SDK
-description: ''
+description: ""
mode: "wide"
---
The Functions SDK gives your project access to a set of APIs that simplify the development and ongoing iteration of AI-powered features and assistants.
-The Functions SDK includes support for AssemblyScript, a portable TypeScript-like language. Support for Golang is in development.
+
+ The Functions SDK includes support for AssemblyScript, a portable
+ TypeScript-like language. Support for Golang is in development.
+
## APIs
-
+
Augment functions with secure access to data in your databases and APIs.
-
- Use AI models for classification, summarization, and other generation use cases.
+
+ Use AI models for classification, summarization, and other generation use
+ cases.
-
- Use embeddings for semantic similarity search, clustering, and outlier detection.
+
+ Use embeddings for semantic similarity search, clustering, and outlier
+ detection.
-
+
Access logging and annotate feedback to iterate faster.
## Installation
-The easiest way to start with Hypermode is using the [template project](https://github.com/gohypermode/template-project). This project includes the [AssemblyScript Library](https://www.npmjs.com/package/@hypermode/functions-as) from the SDK.
\ No newline at end of file
+The easiest way to start with Hypermode is using the [template project](https://github.com/gohypermode/template-project). This project includes the [AssemblyScript Library](https://www.npmjs.com/package/@hypermode/functions-as) from the SDK.
diff --git a/sdk/inference.mdx b/sdk/inference.mdx
index 93e54358..eb0e23a1 100644
--- a/sdk/inference.mdx
+++ b/sdk/inference.mdx
@@ -1,20 +1,25 @@
---
title: Inference
-description: ''
+description: ""
---
Inference APIs allow you to invoke AI models defined in your project's [manifest](../manifest) with less scaffolding.
-We're introducing new APIs consistently through ongoing development with build partners. [Let's chat](mailto:help@hypermode.com) about what would make the Functions SDK even more powerful for your next use case!
+
+ We're introducing new APIs consistently through ongoing development with build
+ partners. [Let's chat](mailto:help@hypermode.com) about what would make the
+ Functions SDK even more powerful for your next use case!
+
### generateText
+
Invoke a generative AI model with an instruction and prompt, resulting in a text response.
```TypeScript
generateText (
- modelName: string,
- instruction: string,
- prompt: string
+ modelName: string,
+ instruction: string,
+ prompt: string
): string
```
@@ -31,12 +36,13 @@ generateText (
### computeClassificationLabels
+
Invoke a fine-tuned classification model with a text input, resulting in an array of labels and probabilities.
```TypeScript
computeClassificationLabels (
- modelName: string,
- text: string
+ modelName: string,
+ text: string
): Map
```
@@ -45,16 +51,18 @@ computeClassificationLabels (
- Text input for classification amongst labels defined in the fine-tuning process.
+ Text input for classification amongst labels defined in the fine-tuning
+ process.
### embedText
+
Invoke an embedding model with a text input, resulting in a vector embedding.
```TypeScript
embedText (
- modelName: string,
- text: string,
+ modelName: string,
+ text: string,
): number
```
@@ -64,4 +72,4 @@ embedText (
Text input for embedding.
-
\ No newline at end of file
+
diff --git a/sdk/search.mdx b/sdk/search.mdx
index b8903d31..2b110d9d 100644
--- a/sdk/search.mdx
+++ b/sdk/search.mdx
@@ -1,8 +1,12 @@
---
title: Search
-description: ''
+description: ""
---
-We're introducing new APIs consistently through ongoing development with build partners. [Let's chat](mailto:help@hypermode.com) about what would make the Functions SDK even more powerful for your next use case!
+
+ We're introducing new APIs consistently through ongoing development with build
+ partners. [Let's chat](mailto:help@hypermode.com) about what would make the
+ Functions SDK even more powerful for your next use case!
+
-The [embedText](/sdk/inference#embedtext) API creates text embeddings for use in semantic similarity search use cases.
\ No newline at end of file
+The [embedText](/sdk/inference#embedtext) API creates text embeddings for use in semantic similarity search use cases.