Skip to main content
Use DeepSeek models with Hypertic agent.

Installation

Install the OpenAI package (DeepSeek uses OpenAI-compatible API):
pip install hypertic[openai]

Setup

Set your DeepSeek API key as an environment variable:
export DEEPSEEK_API_KEY=...

Initialize Model

Create a DeepSeek model instance:
from hypertic.models import OpenAI
import os

model = OpenAI(
    api_key=os.getenv("DEEPSEEK_API_KEY"),
    model="deepseek-chat",
)

Use with Agent

Pass the model to your agent:
from hypertic.agents import Agent
from hypertic.models import OpenAI
import os

model = OpenAI(
    api_key=os.getenv("DEEPSEEK_API_KEY"),
    model="deepseek-chat",
)
agent = Agent(
    model=model,
    tools=[get_weather],
)

response = agent.run("What's the weather in SF?")
print(response.content)

Configuration Options

Supported parameters for DeepSeek models:
from hypertic.models import OpenAI
import os

model = OpenAI(
    api_key=os.getenv("DEEPSEEK_API_KEY"),
    model="deepseek-chat",
    temperature=0.7,
    max_tokens=1000,
)
For the full list of available models and parameters, see the DeepSeek API documentation.