spring-ai icon indicating copy to clipboard operation
spring-ai copied to clipboard

Add support for Replicate.com

Open renemrhfr opened this issue 1 year ago • 2 comments

I would like to propose adding support for Replicate, which is a provider for various AI Models for text generation, image/video/audio, embeddings and more.

Replicate provides access to those models through a unified API where only Input/Output Values differ depending on the selected model.

I already have the code changes ready and use it a lot in my personal projects. It would be an honour for me to contribute back to spring-ai.

Implementation / Expected Behaviour I would suggest an implementation that provides four model classes to handle various response types:

  1. ReplicateChatModel (implements ChatModel) Handles text-based LLMS like GPT, Claude, Llama, DeepSeek etc.
  2. ReplicateMediaModel Handles image, video and audio generation models like Flux, Sora etc.
  3. ReplicateStructuredModel Handles models returning structured JSON objects like embeddings, OCR etc.
  4. ReplicateStringModel Handles Models that return simple String outputs like Content Classifiers.

Current Behavior Currently there is no support for Replicate.com.

Future Idea Replicate also supports training, fine-tuning and deploying custom models. We could also add support for this in the future as those opens up a lot of interesting use cases.

I have a PR ready and wanted to ask if this is something you think would be valuable for spring ai. I would be more than happy to contribute

renemrhfr avatar Oct 25 '25 20:10 renemrhfr

We don't plan to add such support but we would welcome an external repository supporting it, we could reference it in our reference documentation.

sdeleuze avatar May 24 '26 15:05 sdeleuze

I see it was created in https://github.com/spring-ai-community/spring-ai-replicate, so all good.

sdeleuze avatar May 24 '26 15:05 sdeleuze