AI IN SYMFONY

Flexibility in the Face of Uncertainty
profile-image

Hi, I'm Johannes Wachter

  • Core Developer at Sulu CMS & Creator of ModelflowAI
  • Works with Symfony since 2012
  • Lecturer at University of Applied Science Dornbirn
  • Open Source & AI Enthusiast
  • Father of two

Imagine waking up tomorrow and...

We are thrilled to announce our new State-Of-The-Art Model.
The old one is deprecated and not available anymore.

Your AI Provider

Or worse:

  • Your critical feature is deprecated
  • Provider stops serving your region
  • Provider goes out of business
  • Compliance requirements aren't met

A typical integration

  • Decide on a provider
  • Integrate their API
  • Build your application

And hope for the best

Enter ModelflowAI

github.com/modelflow-ai

  • One Interface, Multiple Providers
  • Criteria-based Model Selection
  • Flexible Integration
  • Feature Rich (Streaming, Multi-Modal, Image Generation, ...)

Enter ModelflowAI

github.com/modelflow-ai

  • One Interface, Multiple Providers
  • Criteria-based Model Selection
  • Flexible Integration
  • Feature Rich (Streaming, Multi-Modal, Image Generation, ...)

And now... Live Demo!

Advanced Features

  • Streaming
  • Tools (aka. function calls)
  • Multi-Modal Vision
  • Image Generation

Advanced Features

  • Streaming
  • Tools (aka. function calls)
  • Multi-Modal Vision
  • Image Generation

Advanced Features

  • Streaming
  • Tools (aka. function calls)
  • Multi-Modal Vision
  • Image Generation

Advanced Features

  • Streaming
  • Tools (aka. function calls)
  • Multi-Modal Vision
  • Image Generation

Sulu CMS Integration

  • Seamless integration of AI in Sulu CMS
  • UI for Translations and Chat dialogs
  • Advanced field-based operations like translation and optimization
  • Upcoming release of the SuluAiBundle

Resources & Next Steps

Thanks for your attention!

Welcome to my talk about AI in Symfony. I'm Johannes Wachter and I'm going to show you how to build flexible AI integrations in Symfony.

I'm core developer at Sulu CMS and creator of ModelflowAI. I've been working with Symfony since 2012 and I'm also a lecturer at the University of Applied Science Dornbirn. I'm an open-source and AI enthusiast and a father of two little girls.

Imagine waking up tomorrow and receiving an email like this. "We are thrilled to announce our new State-Of-The-Art Model. The old one is deprecated and not available anymore." What would you do? Have you ever thought about the risks of integrating AI into your application?

They could be also worse scenarios like: - Your critical feature is deprecated - Provider stops serving your region - Provider goes out of business - Compliance requirements aren't met At the end you have to deal with the consequences and find a solution. That's what we're going to talk about today.

A typical process of integrating AI into your application looks like this: You decide on a provider, integrate their API and build your application. That code is maybe an outcome of a hackathon or a proof of concept. But in most of the cases it will go to production. Because - yeah why not? It works, right? And then you hope for the best.

Now let us enter ModelFlowAI. A library we are taking a look at today. It provides a single interface to multiple providers and allows you to select the best model based on criteria. It's flexible and feature-rich.

This is the same code as before - looks quite similar, right? But it's different. Different in the underlying architecture. It does not rely on a single provider and you code is not coupled to a specific API. And the best thing is: It's open-source and and easy to integrate in you symfony project.

And now I'm going to show you a live demo. We will create a new symfony project and integrate ModelflowAI in a few minutes.

Now that you have seen how to integrate ModelflowAI into your Symfony project, let's take a look at some advanced features. The first one is streaming. Just add the asStream flag and you are good to go.

Same as before, but this time we are using the tools feature.

Also images are possible in the messages. Just ask for any information you need out of the image.

And last but not least: Image Generation. Just provide the text and the model will generate the image for you.

We are also working on a seamless integration of AI in Sulu CMS. The bundle will provide a UI for translations and chat dialogs. Based on ModelflowAi and the UI for sulu the content-manager can easily translate and optimize content. And you are not tight coupled to a specific provider. The SuluAiBundle will be released soon.

That's it for today. If you want to learn more about ModelflowAI, just scan the QR code or visit github directly.

Now that it is already over, I want to thank you for your attention.