Skip to content
Closed
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
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
"server/services/llm/grok",
"server/services/llm/groq",
"server/services/llm/mistral",
"server/services/llm/nebius",
"server/services/llm/nvidia",
"server/services/llm/novita",
"server/services/llm/ollama",
Expand Down
158 changes: 158 additions & 0 deletions server/services/llm/nebius.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
---
title: "Nebius Token Factory"
description: "LLM service implementation using Nebius Token Factory's API with OpenAI-compatible interface"
---

## Overview

`NebiusLLMService` provides access to Nebius Token Factory's language models through an OpenAI-compatible interface. It inherits from `OpenAILLMService` and supports streaming responses, function calling, and context management. Note that Nebius does not support the `developer` message role — `developer`-role messages are automatically converted to `user` role.

<CardGroup cols={2}>
<Card
title="Nebius LLM API Reference"
icon="code"
href="https://reference-server.pipecat.ai/en/latest/api/pipecat.services.nebius.llm.html"
>
Pipecat's API methods for Nebius integration
</Card>
<Card
title="Example Implementation"
icon="play"
href="https://github.com/pipecat-ai/pipecat/blob/main/examples/foundational/14v-function-calling-nebius.py"
>
Complete example with function calling
</Card>
<Card
title="Nebius Token Factory Documentation"
icon="book"
href="https://nebius.com/docs/token-factory"
>
Official Nebius Token Factory API documentation and features
</Card>
<Card title="Nebius Platform" icon="microphone" href="https://nebius.com/">
Access models and manage API keys on Nebius
</Card>
</CardGroup>

## Installation

To use Nebius services, install the required dependencies:

```bash
pip install "pipecat-ai[nebius]"
```

## Prerequisites

### Nebius Account Setup

Before using Nebius LLM services, you need:

1. **Nebius Account**: Sign up at [Nebius](https://tokenfactory.nebius.com/)
2. **API Key**: Generate an API key from your account dashboard
3. **Model Selection**: Choose from available models hosted on Nebius Token Factory

### Required Environment Variables

- `NEBIUS_API_KEY`: Your Nebius API key for authentication

## Configuration

<ParamField path="api_key" type="str" required>
Nebius API key for authentication.
</ParamField>

<ParamField
path="base_url"
type="str"
default="https://api.tokenfactory.nebius.com/v1/"
>
Base URL for the Nebius Token Factory API endpoint.
</ParamField>

<ParamField path="settings" type="NebiusLLMService.Settings" default="None">
Runtime-configurable settings. See [Settings](#settings) below.
</ParamField>

### Settings

Runtime-configurable settings passed via the `settings` constructor argument using `NebiusLLMService.Settings(...)`. These can be updated mid-conversation with `LLMUpdateSettingsFrame`. See [Service Settings](/guides/fundamentals/service-settings) for details.

The default model is `openai/gpt-oss-120b`. This service uses the same settings as `OpenAILLMService`. See [OpenAI LLM Settings](/server/services/llm/openai#settings) for the full parameter reference.

## Usage

### Basic Setup

```python
import os
from pipecat.services.nebius.llm import NebiusLLMService

llm = NebiusLLMService(
api_key=os.getenv("NEBIUS_API_KEY"),
)
```

### With Custom Settings

```python
import os
from pipecat.services.nebius.llm import NebiusLLMService

llm = NebiusLLMService(
api_key=os.getenv("NEBIUS_API_KEY"),
settings=NebiusLLMService.Settings(
model="openai/gpt-oss-120b",
temperature=0.7,
top_p=0.9,
max_completion_tokens=1024,
),
)
```

### With Function Calling

```python
import os
from pipecat.services.nebius.llm import NebiusLLMService
from pipecat.services.llm_service import FunctionCallParams
from pipecat.adapters.schemas.function_schema import FunctionSchema
from pipecat.adapters.schemas.tools_schema import ToolsSchema

async def fetch_weather_from_api(params: FunctionCallParams):
await params.result_callback({"conditions": "nice", "temperature": "75"})

llm = NebiusLLMService(
api_key=os.getenv("NEBIUS_API_KEY"),
settings=NebiusLLMService.Settings(
system_instruction="You are a helpful voice assistant.",
),
)

llm.register_function("get_current_weather", fetch_weather_from_api)

weather_function = FunctionSchema(
name="get_current_weather",
description="Get the current weather",
properties={
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA",
},
"format": {
"type": "string",
"enum": ["celsius", "fahrenheit"],
"description": "The temperature unit to use.",
},
},
required=["location", "format"],
)

tools = ToolsSchema(standard_tools=[weather_function])
```

## Notes

- Nebius does **not** support the `developer` message role. `NebiusLLMService` automatically converts `developer`-role messages to `user`-role messages.
- Model identifiers on Nebius Token Factory use the `organization/model-name` format (e.g. `openai/gpt-oss-120b`).
- Nebius Token Factory is fully compatible with the OpenAI parameter set inherited from `OpenAILLMService`.
89 changes: 45 additions & 44 deletions server/services/supported-services.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,55 +36,56 @@ Serializers convert between frames and media streams, enabling real-time communi

Speech-to-Text services receive and audio input and output transcriptions.

| Service | Setup |
| ----------------------------------------------------- | ---------------------------------------- |
| [AssemblyAI](/server/services/stt/assemblyai) | `pip install "pipecat-ai[assemblyai]"` |
| [AWS Transcribe](/server/services/stt/aws) | `pip install "pipecat-ai[aws]"` |
| [Azure](/server/services/stt/azure) | `pip install "pipecat-ai[azure]"` |
| [Cartesia](/server/services/stt/cartesia) | `pip install "pipecat-ai[cartesia]"` |
| [Deepgram](/server/services/stt/deepgram) | `pip install "pipecat-ai[deepgram]"` |
| [ElevenLabs](/server/services/stt/elevenlabs) | `pip install "pipecat-ai[elevenlabs]"` |
| [Fal Wizper](/server/services/stt/fal) | `pip install "pipecat-ai[fal]"` |
| [Gladia](/server/services/stt/gladia) | `pip install "pipecat-ai[gladia]"` |
| [Google](/server/services/stt/google) | `pip install "pipecat-ai[google]"` |
| [Gradium](/server/services/stt/gradium) | `pip install "pipecat-ai[gradium]"` |
| [Groq (Whisper)](/server/services/stt/groq) | `pip install "pipecat-ai[groq]"` |
| [NVIDIA](/server/services/stt/nvidia) | `pip install "pipecat-ai[nvidia]"` |
| [OpenAI](/server/services/stt/openai) | `pip install "pipecat-ai[openai]"` |
| [Sarvam](/server/services/stt/sarvam) | `pip install "pipecat-ai[sarvam]"` |
| [Soniox](/server/services/stt/soniox) | `pip install "pipecat-ai[soniox]"` |
| [Speechmatics](/server/services/stt/speechmatics) | `pip install "pipecat-ai[speechmatics]"` |
| [Whisper](/server/services/stt/whisper) | `pip install "pipecat-ai[whisper]"` |
| Service | Setup |
| ------------------------------------------------- | ---------------------------------------- |
| [AssemblyAI](/server/services/stt/assemblyai) | `pip install "pipecat-ai[assemblyai]"` |
| [AWS Transcribe](/server/services/stt/aws) | `pip install "pipecat-ai[aws]"` |
| [Azure](/server/services/stt/azure) | `pip install "pipecat-ai[azure]"` |
| [Cartesia](/server/services/stt/cartesia) | `pip install "pipecat-ai[cartesia]"` |
| [Deepgram](/server/services/stt/deepgram) | `pip install "pipecat-ai[deepgram]"` |
| [ElevenLabs](/server/services/stt/elevenlabs) | `pip install "pipecat-ai[elevenlabs]"` |
| [Fal Wizper](/server/services/stt/fal) | `pip install "pipecat-ai[fal]"` |
| [Gladia](/server/services/stt/gladia) | `pip install "pipecat-ai[gladia]"` |
| [Google](/server/services/stt/google) | `pip install "pipecat-ai[google]"` |
| [Gradium](/server/services/stt/gradium) | `pip install "pipecat-ai[gradium]"` |
| [Groq (Whisper)](/server/services/stt/groq) | `pip install "pipecat-ai[groq]"` |
| [NVIDIA](/server/services/stt/nvidia) | `pip install "pipecat-ai[nvidia]"` |
| [OpenAI](/server/services/stt/openai) | `pip install "pipecat-ai[openai]"` |
| [Sarvam](/server/services/stt/sarvam) | `pip install "pipecat-ai[sarvam]"` |
| [Soniox](/server/services/stt/soniox) | `pip install "pipecat-ai[soniox]"` |
| [Speechmatics](/server/services/stt/speechmatics) | `pip install "pipecat-ai[speechmatics]"` |
| [Whisper](/server/services/stt/whisper) | `pip install "pipecat-ai[whisper]"` |

## Large Language Models

LLMs receive text or audio based input and output a streaming text response.

| Service | Setup |
| ------------------------------------------------------ | -------------------------------------- |
| [Anthropic](/server/services/llm/anthropic) | `pip install "pipecat-ai[anthropic]"` |
| [AWS Bedrock](/server/services/llm/aws) | `pip install "pipecat-ai[aws]"` |
| [Azure](/server/services/llm/azure) | `pip install "pipecat-ai[azure]"` |
| [Cerebras](/server/services/llm/cerebras) | `pip install "pipecat-ai[cerebras]"` |
| [DeepSeek](/server/services/llm/deepseek) | `pip install "pipecat-ai[deepseek]"` |
| [Fireworks AI](/server/services/llm/fireworks) | `pip install "pipecat-ai[fireworks]"` |
| [Google Gemini](/server/services/llm/google) | `pip install "pipecat-ai[google]"` |
| [Google Vertex AI](/server/services/llm/google-vertex) | `pip install "pipecat-ai[google]"` |
| [Grok](/server/services/llm/grok) | `pip install "pipecat-ai[grok]"` |
| [Groq](/server/services/llm/groq) | `pip install "pipecat-ai[groq]"` |
| [Mistral](/server/services/llm/mistral) | `pip install "pipecat-ai[mistral]"` |
| [NVIDIA](/server/services/llm/nvidia) | `pip install "pipecat-ai[nvidia]"` |
| [Novita AI](/server/services/llm/novita) | `pip install "pipecat-ai[novita]"` |
| [Ollama](/server/services/llm/ollama) | `pip install "pipecat-ai[ollama]"` |
| [OpenAI](/server/services/llm/openai) | `pip install "pipecat-ai[openai]"` |
| [OpenAI Responses](/server/services/llm/openai-responses) | `pip install "pipecat-ai[openai]"` |
| [OpenPipe](/server/services/llm/openpipe) | `pip install "pipecat-ai[openpipe]"` |
| [OpenRouter](/server/services/llm/openrouter) | `pip install "pipecat-ai[openrouter]"` |
| [Perplexity](/server/services/llm/perplexity) | `pip install "pipecat-ai[perplexity]"` |
| [Qwen](/server/services/llm/qwen) | `pip install "pipecat-ai[qwen]"` |
| [SambaNova](/server/services/llm/sambanova) | `pip install "pipecat-ai[sambanova]"` |
| [Sarvam](/server/services/llm/sarvam) | `pip install "pipecat-ai[sarvam]"` |
| [Together AI](/server/services/llm/together) | `pip install "pipecat-ai[together]"` |
| Service | Setup |
| --------------------------------------------------------- | -------------------------------------- |
| [Anthropic](/server/services/llm/anthropic) | `pip install "pipecat-ai[anthropic]"` |
| [AWS Bedrock](/server/services/llm/aws) | `pip install "pipecat-ai[aws]"` |
| [Azure](/server/services/llm/azure) | `pip install "pipecat-ai[azure]"` |
| [Cerebras](/server/services/llm/cerebras) | `pip install "pipecat-ai[cerebras]"` |
| [DeepSeek](/server/services/llm/deepseek) | `pip install "pipecat-ai[deepseek]"` |
| [Fireworks AI](/server/services/llm/fireworks) | `pip install "pipecat-ai[fireworks]"` |
| [Google Gemini](/server/services/llm/google) | `pip install "pipecat-ai[google]"` |
| [Google Vertex AI](/server/services/llm/google-vertex) | `pip install "pipecat-ai[google]"` |
| [Grok](/server/services/llm/grok) | `pip install "pipecat-ai[grok]"` |
| [Groq](/server/services/llm/groq) | `pip install "pipecat-ai[groq]"` |
| [Mistral](/server/services/llm/mistral) | `pip install "pipecat-ai[mistral]"` |
| [Nebius Token Factory](/server/services/llm/nebius) | `pip install "pipecat-ai[nebius]"` |
| [NVIDIA](/server/services/llm/nvidia) | `pip install "pipecat-ai[nvidia]"` |
| [Novita AI](/server/services/llm/novita) | `pip install "pipecat-ai[novita]"` |
| [Ollama](/server/services/llm/ollama) | `pip install "pipecat-ai[ollama]"` |
| [OpenAI](/server/services/llm/openai) | `pip install "pipecat-ai[openai]"` |
| [OpenAI Responses](/server/services/llm/openai-responses) | `pip install "pipecat-ai[openai]"` |
| [OpenPipe](/server/services/llm/openpipe) | `pip install "pipecat-ai[openpipe]"` |
| [OpenRouter](/server/services/llm/openrouter) | `pip install "pipecat-ai[openrouter]"` |
| [Perplexity](/server/services/llm/perplexity) | `pip install "pipecat-ai[perplexity]"` |
| [Qwen](/server/services/llm/qwen) | `pip install "pipecat-ai[qwen]"` |
| [SambaNova](/server/services/llm/sambanova) | `pip install "pipecat-ai[sambanova]"` |
| [Sarvam](/server/services/llm/sarvam) | `pip install "pipecat-ai[sarvam]"` |
| [Together AI](/server/services/llm/together) | `pip install "pipecat-ai[together]"` |

## Text-to-Speech

Expand Down