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
5 changes: 5 additions & 0 deletions core/llm/autodetect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const PROVIDER_HANDLES_TEMPLATING: string[] = [
"groq",
"gemini",
"docker",
"nous",
// TODO add these, change to inverted logic so only the ones that need templating are hardcoded
// Asksage.ts
// Azure.ts
Expand Down Expand Up @@ -365,6 +366,10 @@ function autodetectTemplateType(model: string): TemplateType | undefined {
return "deepseek";
}

if (lower.includes("hermes")) {
return "chatml";
}

if (lower.includes("ninja") || lower.includes("openchat")) {
return "openchat";
}
Expand Down
13 changes: 13 additions & 0 deletions core/llm/llms/Nous.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { LLMOptions } from "../..";

import OpenAI from "./OpenAI";

class Nous extends OpenAI {
static providerName = "nous";
static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://inference-api.nousresearch.com/v1",
useLegacyCompletionsEndpoint: false,
};
}

export default Nous;
2 changes: 2 additions & 0 deletions core/llm/llms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import Moonshot from "./Moonshot";
import Msty from "./Msty";
import NCompass from "./NCompass";
import Nebius from "./Nebius";
import Nous from "./Nous";
import Novita from "./Novita";
import Nvidia from "./Nvidia";
import Ollama from "./Ollama";
Expand Down Expand Up @@ -114,6 +115,7 @@ export const LLMClasses = [
Cerebras,
Asksage,
Nebius,
Nous,
Venice,
VertexAI,
xAI,
Expand Down
95 changes: 95 additions & 0 deletions docs/customize/model-providers/more/nous.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: Nous Research
slug: ../nous
---

<Tip>
**Discover Nous Research Hermes models for advanced reasoning and instruction following**
</Tip>

<Info>
You can get an API key from the [Nous Research Portal](https://portal.nousresearch.com/).
</Info>

## Available Models

| Model | Context Length | Description |
|-------|----------------|-------------|
| `Hermes-4.3-36B` | 128k | Compact reasoning model with thinking capabilities |
| `Hermes-4-70B` | 128k | Large reasoning model with 128k context |
| `Hermes-4-405B` | 128k | Flagship reasoning model |
| `Hermes-3-Llama-3.1-70B` | 32k | Instruction-tuned on Llama 3.1 70B |
| `Hermes-3-Llama-3.1-405B` | 32k | Instruction-tuned on Llama 3.1 405B |

## Configuration

<Tabs>
<Tab title="YAML">
```yaml title="config.yaml"
name: My Config
version: 0.0.1
schema: v1

models:
- name: Hermes 4.3 36B
provider: nous
model: Hermes-4.3-36B
apiKey: <YOUR_NOUS_API_KEY>
```
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"models": [
{
"title": "Hermes 4.3 36B",
"provider": "nous",
"model": "Hermes-4.3-36B",
"apiKey": "<YOUR_NOUS_API_KEY>"
}
]
}
```
</Tab>
</Tabs>

## Reasoning Mode

Hermes 4 and DeepHermes models support reasoning with chain-of-thought. To enable reasoning, use the following system prompt:

```
You are a deep thinking AI, you may use extremely long chains of thought to deeply consider the problem and deliberate with yourself via systematic reasoning processes to help come to a correct solution prior to answering. You should enclose your thoughts and internal monologue inside <think> </think> tags, and then provide your solution or response to the problem.
```

<Tabs>
<Tab title="YAML">
```yaml title="config.yaml"
name: My Config
version: 0.0.1
schema: v1

models:
- name: Hermes 4.3 36B (Reasoning)
provider: nous
model: Hermes-4.3-36B
apiKey: <YOUR_NOUS_API_KEY>
systemMessage: |
You are a deep thinking AI, you may use extremely long chains of thought to deeply consider the problem and deliberate with yourself via systematic reasoning processes to help come to a correct solution prior to answering. You should enclose your thoughts and internal monologue inside <think> </think> tags, and then provide your solution or response to the problem.
```
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"models": [
{
"title": "Hermes 4.3 36B (Reasoning)",
"provider": "nous",
"model": "Hermes-4.3-36B",
"apiKey": "<YOUR_NOUS_API_KEY>",
"systemMessage": "You are a deep thinking AI, you may use extremely long chains of thought to deeply consider the problem and deliberate with yourself via systematic reasoning processes to help come to a correct solution prior to answering. You should enclose your thoughts and internal monologue inside <think> </think> tags, and then provide your solution or response to the problem."
}
]
}
```
</Tab>
</Tabs>
1 change: 1 addition & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
"customize/model-providers/more/llamastack",
"customize/model-providers/more/mimo",
"customize/model-providers/more/mistral",
"customize/model-providers/more/nous",
"customize/model-providers/more/nvidia",
"customize/model-providers/more/together",
"customize/model-providers/more/xAI"
Expand Down
70 changes: 70 additions & 0 deletions gui/src/pages/AddNewModel/configs/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,76 @@ export interface ModelPackage {
}

export const models: { [key: string]: ModelPackage } = {
hermes3Llama31_405b: {
title: "Hermes 3 Llama 3.1 405B",
description:
"Nous Research's Hermes 3, a powerful instruction-tuned model built on Llama 3.1 405B with strong reasoning and tool use capabilities.",
refUrl: "https://nousresearch.com/hermes3",
params: {
title: "Hermes 3 Llama 3.1 405B",
model: "Hermes-3-Llama-3.1-405B",
contextLength: 32_000,
},
icon: "nous.png",
providerOptions: ["nous"],
isOpenSource: true,
},
hermes3Llama31_70b: {
title: "Hermes 3 Llama 3.1 70B",
description:
"Nous Research's Hermes 3, built on Llama 3.1 70B with strong instruction following and reasoning.",
refUrl: "https://nousresearch.com/hermes3",
params: {
title: "Hermes 3 Llama 3.1 70B",
model: "Hermes-3-Llama-3.1-70B",
contextLength: 32_000,
},
icon: "nous.png",
providerOptions: ["nous"],
isOpenSource: true,
},
hermes4_405b: {
title: "Hermes 4 405B",
description:
"Nous Research's Hermes 4, featuring enhanced reasoning with thinking tags for chain-of-thought.",
refUrl: "https://nousresearch.com",
params: {
title: "Hermes 4 405B",
model: "Hermes-4-405B",
contextLength: 128_000,
},
icon: "nous.png",
providerOptions: ["nous"],
isOpenSource: true,
},
hermes4_70b: {
title: "Hermes 4 70B",
description:
"Nous Research's Hermes 4 70B with reasoning capabilities and 128k context.",
refUrl: "https://nousresearch.com",
params: {
title: "Hermes 4 70B",
model: "Hermes-4-70B",
contextLength: 128_000,
},
icon: "nous.png",
providerOptions: ["nous"],
isOpenSource: true,
},
hermes43_36b: {
title: "Hermes 4.3 36B",
description:
"Nous Research's Hermes 4.3 36B, a compact reasoning model with 128k context.",
refUrl: "https://nousresearch.com",
params: {
title: "Hermes 4.3 36B",
model: "Hermes-4.3-36B",
contextLength: 128_000,
},
icon: "nous.png",
providerOptions: ["nous"],
isOpenSource: true,
},
deepseekV3Chat: {
title: "deepseek v3",
description: "A model from deekseek for chat",
Expand Down
32 changes: 32 additions & 0 deletions gui/src/pages/AddNewModel/configs/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1167,4 +1167,36 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo
],
apiKeyUrl: "https://api.router.tetrate.ai/",
},
nous: {
title: "Nous Research",
provider: "nous",
refPage: "nous",
description:
"Nous Research provides Hermes models via an OpenAI-compatible API with advanced reasoning capabilities.",
longDescription:
"Nous Research offers Hermes models including Hermes 3 and Hermes 4 with strong instruction following and reasoning. Get an API key at [portal.nousresearch.com](https://portal.nousresearch.com).",
icon: "nous.png",
tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource],
params: {
apiBase: "https://inference-api.nousresearch.com/v1",
},
collectInputFor: [
{
inputType: "text",
key: "apiKey",
label: "API Key",
placeholder: "Enter your Nous Research API key",
required: true,
},
...completionParamsInputsConfigs,
],
packages: [
models.hermes43_36b,
models.hermes4_70b,
models.hermes4_405b,
models.hermes3Llama31_70b,
models.hermes3Llama31_405b,
],
apiKeyUrl: "https://portal.nousresearch.com",
},
};
Loading