Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions configure-environment.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
---
title: Configure Environnment
description: ""
description: "Configure the project's environment in Hypermode Console"
---

<Warning>- host secrets - shared vs. dedicated models - scaling</Warning>
## Host Secrets

In your project dashboard, navigate to Settings -> Hosts. Here you can configure secrets that are used for connecting to external hosts.

Check failure on line 8 in configure-environment.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] In general, use active voice instead of passive voice ('are used').

Check warning on line 8 in configure-environment.mdx

View workflow job for this annotation

GitHub Actions / Vale Lanugage Review

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('are used'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('are used').", "location": {"path": "configure-environment.mdx", "range": {"start": {"line": 8, "column": 95}}}, "severity": "INFO"}

## Shared vs Dedicated Models

By default, models hosted on Hypermode run on a shared instance. All new projects use shared models. You can specify `"dedicated": true` in your `hypermode.json` to enable dedicated models:

```json
{
...
"models": {
"text-generator": {
"sourceModel": "meta-llama/Meta-Llama-3.1-8B-Instruct",
"provider": "hugging-face",
"host": "hypermode",
"dedicated": true
}
}
...
}
```

## Scaling

Coming soon
Binary file added images/observe-functions/function-runs.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 added images/observe-functions/inference-history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 35 additions & 2 deletions integrate-api.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
---
title: Integrate API
description: ""
description: "Use the project's API endpoint and token"
---

<Warning>API endpoint + keys</Warning>
## API Endpoint

You can find your project's API endpoint in your project dashboard. The endpoint follows this format: `https://<project-slug>-<org-slug>.hypermode.app/graphql`.

Check failure on line 8 in integrate-api.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Use 'API Endpoint' instead of 'API endpoint'.

Check failure on line 8 in integrate-api.mdx

View workflow job for this annotation

GitHub Actions / Vale Lanugage Review

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'API Endpoint' instead of 'API endpoint'. Raw Output: {"message": "[Vale.Terms] Use 'API Endpoint' instead of 'API endpoint'.", "location": {"path": "integrate-api.mdx", "range": {"start": {"line": 8, "column": 29}}}, "severity": "ERROR"}

## API Token

In your project dashboard, navigate to Settings -> API Keys to find your API token.

Check failure on line 12 in integrate-api.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Use 'API Token' instead of 'API token'.

Check failure on line 12 in integrate-api.mdx

View workflow job for this annotation

GitHub Actions / Vale Lanugage Review

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'API Token' instead of 'API token'. Raw Output: {"message": "[Vale.Terms] Use 'API Token' instead of 'API token'.", "location": {"path": "integrate-api.mdx", "range": {"start": {"line": 12, "column": 74}}}, "severity": "ERROR"}

You can access the API by passing the API token in the `Authorization` header. Here's an example using the `fetch` API in JavaScript:

Check failure on line 14 in integrate-api.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Use 'API Token' instead of 'API token'.

Check failure on line 14 in integrate-api.mdx

View workflow job for this annotation

GitHub Actions / Vale Lanugage Review

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'API Token' instead of 'API token'. Raw Output: {"message": "[Vale.Terms] Use 'API Token' instead of 'API token'.", "location": {"path": "integrate-api.mdx", "range": {"start": {"line": 14, "column": 39}}}, "severity": "ERROR"}

<CodeGroup>

```javascript index.js
const endpoint = ""; // your API endpoint
const key = ""; // your API key
// your graphql query
const query = `query {
...
}`;

const response = await fetch(endpoint, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: key,
},
body: JSON.stringify({
query: query,
}),
});
const data = await response.json();
```

</CodeGroup>
42 changes: 40 additions & 2 deletions observe-functions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,44 @@

<Warning>- function invocation logs - model inferences</Warning>

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.
When you invoke a function within your project, Hypermode records the 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.
## Function Runs

In your function code, you can add logs to help debug your functions:

<CodeGroup>

```typescript index.ts
console.log("This is a simple log message.");
console.debug("This is a debug message.");
console.info("This is an info message.");
console.warn("This is a warning message.");
console.error("This is an error message.");
```

```go main.go
package main

import (
"github.com/hypermodeinc/modus/sdk/go/pkg/console"

Check notice on line 28 in observe-functions.mdx

View check run for this annotation

Trunk.io / Trunk Check

markdownlint(MD010)

[new] Hard tabs
)

console.Log("This is a simple log message.")
console.Debug("This is a debug message.")
console.Info("This is an info message.")
console.Warn("This is a warning message.")
console.Error("This is an error message.")
```

</CodeGroup>

In your project dashboard, navigate to the Function Runs tab to view execution logs of your functions.

![function runs](images/observe-functions/function-runs.png)

Check failure on line 42 in observe-functions.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Use 'Function Runs' instead of 'function runs'.

Check failure on line 42 in observe-functions.mdx

View workflow job for this annotation

GitHub Actions / Vale Lanugage Review

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Function Runs' instead of 'function runs'. Raw Output: {"message": "[Vale.Terms] Use 'Function Runs' instead of 'function runs'.", "location": {"path": "observe-functions.mdx", "range": {"start": {"line": 42, "column": 3}}}, "severity": "ERROR"}

## Inference History

For each model invocation, Hypermode records the model inference. This includes the input and output of the model, as well as the timestamp and duration of the inference.

![inference history](images/observe-functions/inference-history.png)

Check failure on line 48 in observe-functions.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Use 'Inference History' instead of 'inference history'.

Check failure on line 48 in observe-functions.mdx

View workflow job for this annotation

GitHub Actions / Vale Lanugage Review

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Inference History' instead of 'inference history'. Raw Output: {"message": "[Vale.Terms] Use 'Inference History' instead of 'inference history'.", "location": {"path": "observe-functions.mdx", "range": {"start": {"line": 48, "column": 3}}}, "severity": "ERROR"}
6 changes: 6 additions & 0 deletions styles/config/vocabularies/general/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ timeEnd
triaging
upsert
UUID
Inference History
Function Runs
API Endpoint
API Token
Shared vs Dedicated Models
Host Secrets
Loading