Working with Deepseek in Pixeltable

Pixeltable's Deepseek integration enables you to access Deepseek's LLM via the Deepseek API.

Providers · Notebook · Updated

Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.

What it uses

Install
terminal
pip install pixeltable openai
Environment variables it names
DEEPSEEK_API_KEY
Pixeltable calls
deepseek.chat_completions()pxt.create_table()add_computed_column()insert()

A look at the code

working-with-deepseek.ipynb
from pixeltable.functions import deepseek
# Create a table in Pixeltable and add a computed column that calls Deepseek
t = pxt.create_table('deepseek_demo/chat', {'input': pxt.String})
msgs = [{'role': 'user', 'content': t.input}]
t.add_computed_column(
output=deepseek.chat_completions(
messages=msgs, model='deepseek-flash'
)
)

One cell of the notebook, copied as it is. Open it in Colab for the rest.

Browse all 103