Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Use datasets for rapid prototyping #3539

Open
dentro-innovation opened this issue Nov 20, 2024 · 0 comments
Open

[FEATURE] Use datasets for rapid prototyping #3539

dentro-innovation opened this issue Nov 20, 2024 · 0 comments

Comments

@dentro-innovation
Copy link

Describe the feature you'd like
Add a section "Datasets" just like "Document Store".

Allow me to specify multiple inputs that are later fed to my flowise flow.

Allow me to run all inputs in parallel (or at least automaticall) against a certain flow and display all inputs and outputs.

This ensures that I don't overfit my Agents.

Additional context
Example of how I'm currently doing it with a little script:

import requests
from typing import List, Dict

# Replace with your actual Flowise API endpoint and chatflow ID
API_URL = "http://localhost:3000/api/v1/prediction/<your-chatflow-id>"

# List of German support questions
questions: List[str] = [
    "Wie kann ich mein Passwort zurücksetzen?",
    "Wo finde ich meine Bestellhistorie?",
    "Wie kann ich ein Produkt zurückgeben?",
    "Wann wird meine Bestellung geliefert?",
    "Gibt es Rabatte für Stammkunden?",
    "Wie kann ich meine Zahlungsmethode ändern?",
    "Was sind die Versandkosten?",
    "Wie kann ich den Newsletter abbestellen?",
    "Ist das Produkt auf Lager?",
    "Wie kontaktiere ich den Kundensupport?"
]

def query(payload: Dict) -> Dict:
    response = requests.post(API_URL, json=payload)
    return response.json()

def process_questions(questions: List[str]) -> None:
    for i, question in enumerate(questions, 1):
        print(f"\n--- Question {i} ---")
        print(f"Input: {question}")
        
        response = query({"question": question})
        
        print("Output:")
        if isinstance(response, dict) and 'text' in response:
            print(response['text'])
        else:
            print(response)
        
        print("-" * 40)

if __name__ == "__main__":
    process_questions(questions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant