Label Studio and click on the "Create" button.Enter a name for your project in the "Project Name" field, such as New Project with Chat.Navigate to Labeling Setup > Custom Template and paste the following XML configuration:<View><View className="root">     <Paragraphs name="dialogue"               value="$prompt"               layout="dialogue"               textKey="content"               nameKey="role"               granularity="sentence"/>  <Header value="Final response:"/>    <TextArea name="response" toName="dialogue"              maxSubmissions="1" editable="true"              required="true"/></View><Header value="Rate the response:"/><Rating name="rating" toName="dialogue"/></View>from langchain.chat_models import ChatOpenAIfrom langchain.schema import HumanMessage, SystemMessagefrom langchain.callbacks import LabelStudioCallbackHandlerchat_llm = ChatOpenAI(callbacks=[    LabelStudioCallbackHandler(        mode="chat",        project_name="New Project with Chat",    )])llm_results = chat_llm([    SystemMessage(content="Always use a lot of emojis"),    HumanMessage(content="Tell me a joke")])In Label Studio, open "New Project with Chat". Click on a created task to view dialog history and edit/annotate responses.Custom Labeling Configuration‚ÄãYou can modify the default labeling configuration in LabelStudio to add more target labels like response sentiment, relevance, and many other types annotator's feedback.New labeling configuration can be added from UI: go to Settings > Labeling Interface and set up a custom configuration with additional tags like Choices for sentiment or Rating for relevance. Keep in mind that TextArea tag should be presented in any configuration to display the LLM responses.Alternatively, you can specify the labeling configuration on the initial call before project creation:ls = LabelStudioCallbackHandler(project_config='''<View><Text name="prompt" value="$prompt"/><TextArea name="response" toName="prompt"/><TextArea name="user_feedback"
Label Studio is an open-source data labeling platform that provides LangChain with flexibility when it comes to labeling data for fine-tuning large language models (LLMs). It also enables the preparation of custom training data and the collection and evaluation of responses through human feedback.
Label Studio is an open-source data labeling platform that provides LangChain with flexibility when it comes to labeling data for fine-tuning large language models (LLMs). It also enables the preparation of custom training data and the collection and evaluation of responses through human feedback. ->: Label Studio and click on the "Create" button.Enter a name for your project in the "Project Name" field, such as New Project with Chat.Navigate to Labeling Setup > Custom Template and paste the following XML configuration:<View><View className="root">     <Paragraphs name="dialogue"               value="$prompt"               layout="dialogue"               textKey="content"               nameKey="role"               granularity="sentence"/>  <Header value="Final response:"/>    <TextArea name="response" toName="dialogue"              maxSubmissions="1" editable="true"              required="true"/></View><Header value="Rate the response:"/><Rating name="rating" toName="dialogue"/></View>from langchain.chat_models import ChatOpenAIfrom langchain.schema import HumanMessage, SystemMessagefrom langchain.callbacks import LabelStudioCallbackHandlerchat_llm = ChatOpenAI(callbacks=[    LabelStudioCallbackHandler(        mode="chat",        project_name="New Project with Chat",    )])llm_results = chat_llm([    SystemMessage(content="Always use a lot of emojis"),    HumanMessage(content="Tell me a joke")])In Label Studio, open "New Project with Chat". Click on a created task to view dialog history and edit/annotate responses.Custom Labeling Configuration‚ÄãYou can modify the default labeling configuration in LabelStudio to add more target labels like response sentiment, relevance, and many other types annotator's feedback.New labeling configuration can be added from UI: go to Settings > Labeling Interface and set up a custom configuration with additional tags like Choices for sentiment or Rating for relevance. Keep in mind that TextArea tag should be presented in any configuration to display the LLM responses.Alternatively, you can specify the labeling configuration on the initial call before project creation:ls = LabelStudioCallbackHandler(project_config='''<View><Text name="prompt" value="$prompt"/><TextArea name="response" toName="prompt"/><TextArea name="user_feedback"