#""" Simple Chatbot #@author: Nigel Gebodh #@email: nigel.gebodh@gmail.com #""" """ Simple Chatbot @author: Wedyan2023 @email: w.s.alskaran2@gmail.com """ import streamlit as st from openai import OpenAI # Initialize session state if 'messages' not in st.session_state: st.session_state.messages = [] # Function to generate system prompt based on user inputs def create_system_prompt(classification_type, num_to_generate, domain, min_words, max_words, labels): system_prompt = f"You are a professional {classification_type.lower()} expert. Your role is to generate exactly {num_to_generate} data examples for {domain}. " system_prompt += f"Each example should consist of between {min_words} and {max_words} words. " system_prompt += "Use the following labels: " + ", ".join(labels) + ". Please do not add any extra commentary or explanation. " system_prompt += "Format each example like this: \nExample: , Label: