Skip to content

Commit 637b11e

Browse files
committed
hyp develop section draft
1 parent 9086e8b commit 637b11e

File tree

6 files changed

+103
-6
lines changed

6 files changed

+103
-6
lines changed

configure-environment.mdx

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
---
22
title: Configure Environnment
3-
description: ""
3+
description: "Configure the project's environment in Hypermode Console"
44
---
55

6-
<Warning>- host secrets - shared vs. dedicated models - scaling</Warning>
6+
## Host Secrets
7+
8+
In your project dashboard, navigate to Settings -> Hosts. Here you can configure secrets that are used for connecting to external hosts.
9+
10+
## Shared vs Dedicated Models
11+
12+
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:
13+
14+
```json
15+
{
16+
...
17+
"models": {
18+
"text-generator": {
19+
"sourceModel": "meta-llama/Meta-Llama-3.1-8B-Instruct",
20+
"provider": "hugging-face",
21+
"host": "hypermode",
22+
"dedicated": true
23+
}
24+
}
25+
...
26+
}
27+
```
28+
29+
## Scaling
30+
31+
WIP
267 KB
Loading
420 KB
Loading

integrate-api.mdx

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
11
---
22
title: Integrate API
3-
description: ""
3+
description: "Use the project's API endpoint and token"
44
---
55

6-
<Warning>API endpoint + keys</Warning>
6+
## API Endpoint
7+
8+
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`.
9+
10+
## API Token
11+
12+
In your project dashboard, navigate to Settings -> API Keys to find your API token.
13+
14+
You can access the API by passing the API token in the `Authorization` header. Here's an example using the `fetch` API in JavaScript:
15+
16+
<CodeGroup>
17+
18+
```javascript index.js
19+
const endpoint = '' // your API endpoint
20+
const key = '' // your API key
21+
// your graphql query
22+
const query = `query {
23+
...
24+
}`
25+
26+
const response = await fetch(endpoint, {
27+
method: "POST",
28+
headers: {
29+
"Content-Type": "application/json",
30+
Authorization: key,
31+
},
32+
body: JSON.stringify({
33+
query: query,
34+
}),
35+
})
36+
const data = await response.json()
37+
```
38+
39+
</CodeGroup>

observe-functions.mdx

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,44 @@ description: "Understand what's happening within your functions"
55

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

8-
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.
8+
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.
99

10-
To access the run history, navigate to the Function Runs tab of your project within the Hypermode Console.
10+
## Function Runs
11+
12+
In your function code, you can add logs to help debug your functions:
13+
14+
<CodeGroup>
15+
16+
```typescript index.ts
17+
console.log("This is a simple log message.");
18+
console.debug("This is a debug message.");
19+
console.info("This is an info message.");
20+
console.warn("This is a warning message.");
21+
console.error("This is an error message.");
22+
```
23+
24+
```go main.go
25+
package main
26+
27+
import (
28+
"github.com/hypermodeinc/modus/sdk/go/pkg/console"
29+
)
30+
31+
console.Log("This is a simple log message.")
32+
console.Debug("This is a debug message.")
33+
console.Info("This is an info message.")
34+
console.Warn("This is a warning message.")
35+
console.Error("This is an error message.")
36+
```
37+
38+
</CodeGroup>
39+
40+
In your project dashboard, navigate to the Function Runs tab to view execution logs of your functions.
41+
42+
![function runs](images/observe-functions/function-runs.png)
43+
44+
## Inference History
45+
46+
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.
47+
48+
![inference history](images/observe-functions/inference-history.png)

work-locally.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ title: Work Locally
33
description: ""
44
---
55

6+
67
<Warning>connecting to Hypermode-hosted shared models</Warning>

0 commit comments

Comments
 (0)