Default Title

Une fonction pour fournir des explications sur des extraits de code en utilisant OpenAI et Langchain
Deployments last month 881
  • language
Code Examples
1const { FloomClient } = require('floomai');
2
3const main = async () => {
4 const floomClient = new FloomClient("api-key");
5
6 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 FloomClient
2
3def run_pipeline():
4 floom_client = FloomClient(api_key="api-key")
5 response = floom_client.run(pipelineId="code-explanation-openai-prompt", prompt="Your input")
6
7 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;
2
3public class Example {
4 public static void main(String[] args) {
5 FloomClient floomClient = new FloomClient("api-key");
6
7 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;
3
4public class Example {
5 public static void Main() {
6 var floomClient = new FloomClient("api-key");
7
8 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/run
2Host: floom-endpoint
3Content-Type: application/json
4Authorization: Bearer api-key
5
6{
7 "function": "code-explanation-openai-prompt",
8 "prompt": "Your input"
9}
Details
  • Author:
  • Version: 2.4
  • Total Deployments: 1717
  • Rating: 4.1 / 5
Runtime Information
Language: pythonFramework: langchain/2.1