1const { FloomClient } = require('floomai');23const main = async () => {4 const floomClient = new FloomClient("api-key");56 try {7 const response = await floomClient.run(8 "code-explanation-openai-prompt",9 "Your input"10 );11 console.log('Floom response:', response.values[0].value);12 } catch (error) {13 console.error('Error:', error);14 }15};
1from floom import FloomClient23def run_pipeline():4 floom_client = FloomClient(api_key="api-key")5 response = floom_client.run(pipelineId="code-explanation-openai-prompt", prompt="Your input")67 if response.success:8 for value in response.values:9 print("Response:", value.value)10 else:11 print(f"Error: {response.error.detail}")
1import ai.floom.FloomClient;23public class Example {4 public static void main(String[] args) {5 FloomClient floomClient = new FloomClient("api-key");67 try {8 var response = floomClient.run("code-explanation-openai-prompt", "Your input");9 System.out.println("Response: " + response.getValues().get(0).getValue());10 } catch (Exception e) {11 System.out.println("Error: " + e.getMessage());12 }13 }14}
1using ai.floom;2using System;34public class Example {5 public static void Main() {6 var floomClient = new FloomClient("api-key");78 try {9 var response = floomClient.Run("code-explanation-openai-prompt", "Your input");10 Console.WriteLine("Response: " + response.Values[0].Value);11 } catch (Exception e) {12 Console.WriteLine("Error: " + e.Message);13 }14 }15}
1POST /v1/pipelines/run2Host: floom-endpoint3Content-Type: application/json4Authorization: Bearer api-key56{7 "function": "code-explanation-openai-prompt",8 "prompt": "Your input"9}