Skip to main content

Using AI APIs as Predictor descendants

In SuperDuperDB, developers are able to interact with popular AI API providers, in a way very similar to integrating with AI open-source or home-grown models. Instantiating a model from these providers is similar to instantiating a Model:

OpenAI

Supported

DescriptionClass-name
EmbeddingsOpenAIEmbedding
Chat modelsOpenAIChatCompletion
Image generation modelsOpenAIImageCreation
Image edit modelsOpenAIImageEdit
Audio transcription modelsOpenAIAudioTranscription

Usage

from superduperdb.ext.openai import OpenAI<ModelType> as ModelCls

db.add(Modelcls(identifier='my-model', **kwargs))

Cohere

Supported

DescriptionClass-name
EmbeddingsCohereEmbedding
Chat modelsCohereChatCompletion

Usage

from superduperdb.ext.cohere import Cohere<ModelType> as ModelCls

db.add(Modelcls(identifier='my-model', **kwargs))

Anthropic

Supported

DescriptionClass-name
Chat modelsAnthropicCompletions

Usage

from superduperdb.ext.anthropic import Anthropic<ModelType> as ModelCls

db.add(Modelcls(identifier='my-model', **kwargs))