Skip to content

Commit

Permalink
Merge branch 'main' into rft-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfoxtyler authored Apr 8, 2024
2 parents 3801191 + 0858225 commit f307c2a
Show file tree
Hide file tree
Showing 28 changed files with 212 additions and 130 deletions.
4 changes: 4 additions & 0 deletions .github/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
self-hosted-runner:
# Labels of self-hosted runner in array of string
labels:
- warp-ubuntu-latest-x64-2x
8 changes: 6 additions & 2 deletions .github/workflows/no-broken-links.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 8 additions & 4 deletions .github/workflows/ci-lint.yml → .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
name: ci-lint
name: Vale

on:
pull_request:
types:
- opened
- 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
9 changes: 9 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*out
*logs
*actions
*notifications
*tools
plugins
user_trunk.yaml
user.yaml
tmp
4 changes: 4 additions & 0 deletions .trunk/configs/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"MD013": false,
"MD033": false
}
7 changes: 7 additions & 0 deletions .trunk/configs/.yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rules:
quoted-strings:
required: only-when-needed
extra-allowed: ["{|}"]
key-duplicates: {}
octal-values:
forbid-implicit-octal: true
14 changes: 14 additions & 0 deletions .trunk/configs/svgo.config.js
Original file line number Diff line number Diff line change
@@ -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,
},
},
},
],
};
40 changes: 40 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 5 additions & 4 deletions define-hosts.mdx
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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"
}
]
}
Expand All @@ -19,7 +19,8 @@ Hosts establish connectivity for AI models and other external endpoints. The [pr
## Properties

<ResponseField name="name" type="string" required>
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.
</ResponseField>

<ResponseField name="endpoint" type="string" required>
Expand Down
17 changes: 9 additions & 8 deletions define-models.mdx
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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"
}
]
}
Expand All @@ -22,7 +22,8 @@ AI models are a core resource for inferencing. The [project manifest](/manifest)
## Properties

<ResponseField name="name" type="string" required>
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.
</ResponseField>

<ResponseField name="task" type="string" required>
Expand Down Expand Up @@ -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.
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.
13 changes: 8 additions & 5 deletions define-schema.mdx
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
---
title: Define Schema
description: ''
description: ""
---

<Warning>A new approach for schema definition is currently in development. Expect this to be simpler in the next few weeks. Feedback welcomed!</Warning>
<Warning>
A new approach for schema definition is currently in development. Expect this
to be simpler in the next few weeks. Feedback welcomed!
</Warning>

The schema exposes functions on your project's API endpoint. Define your schema in the `schema.graphql` file in your project.

```graphql schema.graphql
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.
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.
8 changes: 5 additions & 3 deletions deploy.mdx
Original file line number Diff line number Diff line change
@@ -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.

<Note>Preview environments for live validation of pull requests are in development.</Note>
<Note>
Preview environments for live validation of pull requests are in development.
</Note>

## Build

Expand All @@ -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.
For [auto-deployed models](/define-models#auto-deployed-models), Hypermode deploys a dedicated instance of the model.
2 changes: 1 addition & 1 deletion favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions function-observability.mdx
Original file line number Diff line number Diff line change
@@ -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.
To access the run history, navigate to the Function Runs tab of your project within the Hypermode Console.
Binary file modified images/architecture-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/architecture-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Introduction
description: 'Welcome to Hypermode'
description: "Welcome to Hypermode"
mode: "wide"
---

Expand All @@ -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.

<Frame>
<img
className="block dark:hidden"
src="/images/architecture-light.png"
/>
<img
className="hidden dark:block"
src="/images/architecture-dark.png"
/>
</Frame>
<img
className="block dark:hidden"
src="/images/architecture-light.png"
alt="Hypermode's architecture, comprising three layers Functions, Functions SDK, and Runtime Services comprising the three layers."
/>
<img
className="hidden dark:block"
src="/images/architecture-dark.png"
alt="Hypermode's architecture, comprising three layers Functions, Functions SDK, and Runtime Services comprising the three layers."
/>
</Frame>
2 changes: 1 addition & 1 deletion logo/dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion logo/light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 5 additions & 17 deletions manifest.mdx
Original file line number Diff line number Diff line change
@@ -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.

<CardGroup cols={2}>
<Card
title="Models"
icon="message-plus"
href="/define-models"
>
<Card title="Models" icon="message-plus" href="/define-models">
Define inference services for use in your functions
</Card>
<Card
title="Hosts"
icon="server"
href="/define-hosts"
>
<Card title="Hosts" icon="server" href="/define-hosts">
Establish connectivity for models and other external endpoints
</Card>
<Card
title="Schema"
icon="connectdevelop"
href="/define-schema"
>
<Card title="Schema" icon="connectdevelop" href="/define-schema">
Expose functions on your project's API endpoint
</Card>
</CardGroup>
</CardGroup>
Loading

0 comments on commit f307c2a

Please # to comment.