Skip to main content

Basic

Easily Generate Text with AI in your app using 🌊 Floom.

Learning time 🕙: 2 minutes

Create Pipeline

Create a YAML file named 'text-generation.yaml' using your favorite editor.

kind: floom/pipeline/1.2

pipeline:
name: text-generation

prompt:
template:
package: floom/prompt/template/default
system: "Be polite and concise"

Deploy

Deploy the AI Pipeline with Floom CLI to ☁️ Floom Cloud or local 🐳 Floom Docker.

floom deploy text-generation.yaml

Copy the deployed pipeline URI:

Deploying pipeline 'text-generation'...
Deployed to text-generation-28g4fj82.pl.floom.ai

Run

Run the pipeline from your app using Floom SDK.

from floom import FloomClient

floom_client = FloomClient()

floom_client.run(
pipeline="text-generation-28g4fj82.pl.floom.ai",
prompt="Your query here"
)

Production Improvements

including Plugins: Caching, Cost Management, Prompt Validation and Response Validation executed on OpenAI GPT-3.5.